[TYPO3-mvc] FLUID: extended loop features
Martin Kutschker
masi-no at spam-typo3.org
Wed Jan 6 18:31:34 CET 2010
Martin Kutschker schrieb:
> Martin Kutschker schrieb:
>> Hi!
>>
>> I'm missing a few features of Smarty in the view helpers dedicated to rendering of loops. Smarty has
>> a few convenient "variables" which will tell you a bit about the state of the loop. Therefore I
>> propose a name attribute for all loop oriented view helpers.
>
> Another idea which addresses a specific problem is this:
>
> <f:joinedFor each="..." as="element">
> <f:item>{element}</f:item>
> <f:separator>,<f:separator>
> </f:join >
>
> But this is yet another specialzed loop. So for I count three: "for", "groupedFor" and "cycle".
This version is more natural. Or is it "join by" rather than "join with"? Hm.
<f:join each="..." as="name" with="separator">
eg
<f:join each="{persons}" as="person" with=", ">
{person.name}
</f:join>
Is there a need for a "long version" of "with" as an element?
Masi
More information about the TYPO3-project-typo3v4mvc
mailing list