0
votes

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
...

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

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

Both seams not to work inside news templates

1
The error you are getting when using f:groupedFor is almost always the result of a syntax error. Can you show your usage of the ViewHelper so we can have a look?Jost
Thanks for your advise. Today I started a with an empty news template, to get rid of any syntax specific errors. I finally get it to work with the viewhelper linked in my question. I will post my answer with the solution later today.unconnect

1 Answers

0
votes

I finally got the viewhelper to work.

Here is my little extension based on https://gist.github.com/daKmoR/1287203

https://github.com/unconnect/news_grouped_by_date

With this I was able to group news by year.