[TYPO3-mvc] RFC: join view helper

Franz Koch typo3.RemoveForMessage at elements-net.de
Sat Jan 9 16:48:45 CET 2010


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? this way you wouldn't need "lastBy", 
"firstBy", "anyNumberBy" etc? Besides of that it looks quite useful to 
me. But maybe consider some way to also wrap certain items with HTML 
code. Maybe:

<f:join each="..." as="value" splitBy="1||2|*|3||4|*|5">
	<f:join.by position="1"><strong>{value}</strong>, </f:join.by>
	<f:join.by position="2">{value}, </f:join.by>
	<f:join.by position="3"><em>{value}</em>, </f:join.by>
	<f:join.by position="4"><strong>{value}</strong> </f:join.by>
	<f:join.by position="5"> and {value}!</f:join.by>
</f:join>

I know the example html markup is nonsense, but you get the point.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list