I use TYPO3 7.6.6
with news 4.2.1
and realURL 2.0.14
.
I'm using the realURL-Config from the official news-documentation, see below.
I have one detail page for my News (id=33) and my news-tags are listed in folder id=32
...
'fixedPostVars' => array (
...
'33' => 'newsDetailConfiguration',
'14' => 'newsTagConfiguration' // must be the list view for news records
...
The links from the news-list to detail page are working perfect (http://www.example.com/profi-guides/news/detail/some-text/
), but I also show the tags, and if the user click, I've got a link like this:
http://www.example.com/news/detail/?tx_news_pi1%5BoverwriteDemand%5D%5Btags%5D=11&cHash=40c263fd16c0e3a3c548c952f1d6b1da
This is my FLUID-Snippet in the News-List-View:
<f:if condition="{newsItem.tags}">
<!-- Tags -->
<div class="tags">
<i class="icon-icon-tag"></i>
<f:for each="{newsItem.tags}" as="tag">
<f:link.page title="{tag.title}" class="active" pageUid="{settings.listPid}" additionalParams="{tx_news_pi1:{overwriteDemand:{tags: tag}}}">
<span>{tag.title}</span>
</f:link.page>
</f:for>
</div>
</f:if>
How do I get clean realURL-Links from news tags?
My Goal: Listview of news records. If the user click a tag below every news-record -> list view show all news with the corresponding tag. This works already. Only the Link/Querystring is the problem, I need nice URLs, and nothing like ..?tx_news_pi1%5BoverwriteDemand%5D%5Btags%5D=11&cHash=40c263fd16c0e3a3c548c952f1d6b
My news-list plugin is at uid14
, the detail-view at uid33
, my news records at uid31
and my news tags at uid33
.
The solution: realURL Config : newsTagConfiguration
has to be the uid from list view, not from the folder, where the tags are included.
The point to show each news with the tag, so you have a small misconfiguration because of your folder ID.
The documentation says:
"The configuration of newsDetailConfiguration is used for the single view. Its name is not that important but the same name has to be used in line 86 where the uid of the single view page is set. In this example it is 70. Of course you need to set the uid of your single view page."
I think the solution is simple, you need a single view to your tags just like for the categories and not the folder, where your records are collected.
You can not open a tag inside a folder but you need a page with a plugin to handle that.
See the "Tag List" in the documentation from news here.
Tag list
Use this action to show a list of tags.
If you define a specific page id in field "PageId for list display" (inside the tab "Additional") and placing a news plugin with the type "List" there, it is possible to create a tag filter.
UPDATED from the comments:
Try to change the ID to your news List page ID. You have a page for list it is X you have a detail it is 33 and a Folder it is 32. So you have to change 32 to X. See your fluid you have there a part in the link.page: pageUid="{settings.listPid}" listPid is the value, what needed to be used for the Taglist config as well.