如何使用TYPO3多功能新闻系统显示按年份分组的新闻文章 [英] How to display news articles grouped by year with TYPO3 Versatile news system
问题描述
我试图显示按年份分组的LIST-Modul的新闻报道列表.年份本身应作为每组文章的标题显示.喜欢
I tried to show a list of news articles with the LIST-Modul grouped by year. The year itself should be displayed as headline for each group of articles. Like
2014
--------
article 1
article 2
article 3
--------
2013
--------
article 4
article 5
...
我尝试使用扩展的标准list.html模板中的f:groupedFor
viewhelper来实现它.在pagedNews部分中.但是TYPO3引发异常: http://wiki.typo3.org/Exception/CMS/1237900529
I tried to implement it with the f:groupedFor
viewhelper in the standard list.html template of the extension. inside the pagedNews part. But TYPO3 throws the exception: http://wiki.typo3.org/Exception/CMS/1237900529
我还尝试了此处提到的viewhelper: https://gist.github.com/daKmoR/1287203 并在此处
I also tried the viewhelper mentioned here: https://gist.github.com/daKmoR/1287203 and read the question here Display list of elements grouped by year and by month in TYPO3 Fluid
两个接缝在news
模板中不起作用
Both seams not to work inside news
templates
推荐答案
我终于让viewhelper起作用了.
I finally got the viewhelper to work.
这是我基于 https://gist.github.com/daKmoR/1287203
https://github.com/unconnect/news_grouped_by_date
借助此功能,我可以按年份对新闻进行分组.
With this I was able to group news by year.
这篇关于如何使用TYPO3多功能新闻系统显示按年份分组的新闻文章的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!