【发布时间】:2016-05-11 07:51:16
【问题描述】:
我将TYPO3 7.6.6 与news 4.2.1 和realURL 2.0.14 一起使用。
我正在使用来自official news-documentation 的 realURL-Config,见下文。
我的新闻 (id=33) 有一个详细信息页面,我的新闻标签列在 id=32 文件夹中
...
'fixedPostVars' => array (
...
'33' => 'newsDetailConfiguration',
'14' => 'newsTagConfiguration' // must be the list view for news records
...
从新闻列表到详细信息页面的链接工作正常(http://www.example.com/profi-guides/news/detail/some-text/),但我也显示了标签,如果用户点击,我有一个这样的链接:
http://www.example.com/news/detail/?tx_news_pi1%5BoverwriteDemand%5D%5Btags%5D=11&cHash=40c263fd16c0e3a3c548c952f1d6b1da
这是我在新闻列表视图中的流体片段:
<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>
如何从新闻标签中获取干净的 realURL-Links?
我的目标: 新闻记录列表视图。如果用户单击每个新闻记录下方的标签 -> 列表视图,则显示具有相应标签的所有新闻。这已经奏效了。只有链接/查询字符串是问题所在,我需要漂亮的 URL,而没有像 ..?tx_news_pi1%5BoverwriteDemand%5D%5Btags%5D=11&cHash=40c263fd16c0e3a3c548c952f1d6b 这样的东西
我的新闻列表插件位于uid14,详细视图位于uid33,我的新闻记录位于uid31,我的新闻标签位于uid33。
解决方案: realURL Config : newsTagConfiguration必须是列表视图中的 uid,而不是包含标签的文件夹中的 uid。
【问题讨论】:
标签: tags typo3 realurl tx-news