Hi Simon,

Use the iterator for the foreach, you can use isfirst if you want to
prepend the , or islast to append. See https://wiki.typo3.org/Fluid#f:for

Richard

On 23 October 2015 at 08:57, Simon Browning <si...@stwdesign.com> wrote:

> I'm trying to figure out how to add a space, comma, or some other
> delimiter between items in a for each inline statement, can't see how to do
> it though.  (I'm outputting categories as class names in tx_news for a nice
> filter).
> Here's what I've got, can anyone help?
>
> {category.title -> f:for(each: newsItem.categories, as: 'category')}
>
> It outputs: category1category2category3, but of course what I'd like is:
> category1 category2 category 3
>
> Thank you
>
> Simon
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english@lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>
_______________________________________________
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

Reply via email to