[TYPO3-dev] Fluid For Viewhelper inline notation

Dirk Wenzel wenzel at webfox03.de
Tue Jan 28 11:25:20 CET 2014


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