[TYPO3-dev] Call Fluid view-helper in attribute

Bastian Waidelich bastian at typo3.org
Wed Sep 22 10:39:24 CEST 2010


Thomas "Thasmo" Deinhamer wrote:

Hi Thomas,

> Regarding the if viewhelper - I think the shorthand
> syntax for the if viewhelper does not work (yet?).

yes it does:
{f:if(condition: foo, then: 'foo', else: 'no foo')}
but you can't nest shorthand syntax within shorthand syntax.

> What you can also do, for many viewhelpers is chaining:
> {myText->f:nl2br()} (HOpefully the syntax is correct.)

almost. it's
{myText -> f:format.nl2br()}
and you can chain it like
{myText -> f:format.crop(maxCharacter: 100) -> f:format.nl2br()}

Best,
Bastian




More information about the TYPO3-dev mailing list