[TYPO3-dev] Fluid For Viewhelper inline notation

Dirk Wenzel wenzel at webfox03.de
Tue Jan 28 13:50:42 CET 2014


I guess it could be done with some weird chaining or nesting with the 
f:format.printf viewhelper but I could not figure out the syntax...

Am 28.01.14 11:25, schrieb Dirk Wenzel:
> Hi,
> I got categorized objects and want to mark them with a class for each
> category like that:
>
> <div class="category-1 category-13 category-x">
>
> My approach is to use the inline notation of the f:for viewhelper.
> I managed to find it:
>
> {category.uid->f:for(each: '{position.categories}', as: 'category')}
>
> How can I add a prefix and &nbsp; to each item in the iteration?
>
> I tried:
> {'category-'category.uid->f:for(each: '{position.categories}', as:
> 'category')} and
> {\'category-\'category.uid->f:for(each: '{position.categories}', as:
> 'category')}
> but either breaks the inline viewhelper.
> category-{category.uid->f:for(each: '{position.categories}', as:
> 'category')} just renders
> category-113 for category 1 and 13
>
> Kind Regards
> Dirk



More information about the TYPO3-dev mailing list