简体   繁体   English

TYPO3扩展新闻(tx_news)在详细信息页面上显示和链接标签

[英]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 ). 我正在使用带有扩展news (4.1.0)的TYPO3 7.6.2 ...在我的详细信息页面上显示新闻tagsown template : Resources/Private/Extensions/News/Templates/News/Detail.html )。

At list view it's no problem to show & hyperlink a list of tags . 在列表视图中,显示并超链接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. uid错误,请参见屏幕截图。 How can I make a link from detail- to tag-list-view with the corresponding tag ? 如何建立带有相应tag从detail-to到tag-list-view的链接?

调试

它仅适用于包含新闻列表的页面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. 您将uid用作页面uid,从而给您错误的链接。 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}}}">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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