[TYPO3-mvc] RFC: join view helper

Martin Kutschker masi-no at spam-typo3.org
Sat Jan 9 17:03:59 CET 2010


Franz Koch schrieb:
> Hi Masi,
> 
>> Perhaps an optional argument "lastBy" eases things even more:
>>
>> <f:join each="{0: 'apple', 1: 'banana', 2: 'mango'}" by=", " lastBy="
>> and " />
>>
>> Which would yield: "apple, banana and mango"
> 
> how about supporting optionSplit?

The functionality of optionSplit is great, but the syntax is, ahem, awkward to say the least. The
idea for this syntax was to make things comprehensible.

> this way you wouldn't need "lastBy",

If the "for" view helper would give me access to its loop counter I wouldn't need "join" at all.
OTOH this short syntax has a very natural feel and will be understood at once by non-coders.

Masi


More information about the TYPO3-project-typo3v4mvc mailing list