[TYPO3-english] Vhs-viewhelper for loop
Jacob Roe
joakim-m at outlook.com
Thu Dec 1 09:25:16 CET 2016
I'm trying to get the next news item from within current news item.
Using the extension "vhs" and tx_news.
{namespace v=FluidTYPO3\Vhs\ViewHelpers}
<f:for each="{news}" as="newsItem" iteration="iterator">
Current title: {newsItem.title}
<v:variable.set name="nextNews" value="{v:iterator.next(needle: newsItem, haystack: news)}"/>
Next title: {nextNews.title}
</f:for>
It will print correct titles once. Then the loop ends abruptly.
More information about the TYPO3-english
mailing list