简体   繁体   中英

TYPO3 Extension News (tx_news) show & link tags at detail page

I'm using TYPO3 7.6.2 with the extension news (4.1.0) ... I'm showing the news tags at my detail page ( own template : Resources/Private/Extensions/News/Templates/News/Detail.html ).

At list view it's no problem to show & hyperlink a list of tags . But not at detail view.I can show them but how can I link the seperate tags as well?

<f:for each="{newsItem.tags}" as="tag">
  <f:link.page title="{tag.title}" pageUid="{tag.uid}" additionalParams="{tx_news_pi1:{overwriteDemand:{tags: tag}}}">
    {tag.title}
   </f:link.page>
 </f:for>

The uid is wrong, see screenshot. How can I make a link from detail- to tag-list-view with the corresponding tag ?

调试

它仅适用于包含新闻列表的页面ID:

<f:link.page title="{tag.title}" pageUid="{22}" additionalParams="{tx_news_pi1:{overwriteDemand:{tags: tag}}}">

You use the uid as a page uid, thus gives you the wrong link. You need to link to a page where you have a list of the news items with a certain tag :

 <f:link.page title="{tag.title}" pageUid="{settings.mynewssettings.pageidoftaglist}" additionalParams="{tx_news_pi1:{overwriteDemand:{tags: tag}}}">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM