[TYPO3-50-general] RFC: Improved Shorthand Syntax
Xavier Perseguers
typo3 at perseguers.ch
Tue Oct 20 11:40:12 CEST 2009
Hi,
>> There is just one thing I am not really sure about: Should we use -> or
>> | for chaining?
>
> Mh, that would be
> {post.title | f:format.crop(maxChars: 30) | f:format.nl2br()}
>
> instead of
>
> {post.title->f:format.crop(maxChars: 30)->f:format.nl2br()}
>
> right?
> What I prefer with the latter syntax is, that the order is clearer (crop
> title and _then_ convert newlines to breaks)
If you think as of command-line, then order is clear too ;-)
> Or maybe something completely different? ;)
> Actually the Fluid "modifiers" seem to have a similar gain as TypoScript
> 2.0 processors:
>
> 10 = Text
> 10.value = "10"
> 10.value << 1.multiply(1.5)
>
> so what about:
>
> {post.title << f:format.crop(maxChars: 30) << f:format.nl2br()}
>
> ..I don't know
I fear this will be a problem with XML...
Cheers
--
Xavier Perseguers
MVC ExtJS Leader
http://forge.typo3.org/projects/show/extension-mvc_extjs
More information about the TYPO3-project-5_0-general
mailing list