[TYPO3-mvc] Applying Fluid Viewhelpers using an additional syntax
Thomas "Thasmo" Deinhamer
thasmo at gmail.com
Wed Dec 16 18:57:28 CET 2009
Ah, I didn't know that, thanks
for answering my question.
Using -> is fine for me, too.
Thanks,
Thomas
Sebastian Kurfürst schrieb:
> Hey,
>
>> {object.text
>> |f:format.crop(maxCharacters: 100)
>> |f:format.nl2br
>> |f:format.html
>> |f:format.printf(arguments: {a: 1, b: 2})
>> }
> This is not possible, but instead the following syntax works:
> {object.text
> ->f:format.crop(maxCharacters: 100)
> ->f:format.nl2br()
> ->f:format.html()
> ->f:format.printf(arguments: {a: 1, b: 2})
> }
>
> So, we use -> instead of |, and you _have_ to use brackets after the
> ViewHelper name (else the parser cannot disambigurate the different cases).
>
> We have had a long discussion on the ML to use -> instead of | when we
> implemented this :-)
>
>> instead of this:
>>
>> <f:format.printf arguments="{a: 1, b: 2}">
>> <f:format.html>
>> <f:format.nl2br>
>> <f:format.crop maxCharacters="100">
>> {object.value}
>> </f:format.crop>
>> </f:format.nl2br>
>> </f:format.html>
>> </f:format.printf>
> Yep, that was exactly the use-case for it ;)
>
> Greets,
> Sebastian
More information about the TYPO3-project-typo3v4mvc
mailing list