[TYPO3-50-general] RFC: Improved Shorthand Syntax

Bastian Waidelich bastian at typo3.org
Tue Oct 20 13:32:56 CEST 2009


Sebastian Kurfürst wrote:

Hey,

> {post.title->f:format.crop(maxChars: 30)->f:format.nl2br()}
> 
> is acutally the following:
> <f:format.nl2br>
>   <f:format.crop maxChars="30">
>     {post.title}
>   </f:format.crop>
> </f:format.nl2br>

But, that's what I'd expect anyways.. It would be similar if crop() and 
nl2br would be methods of the object:

$stringObject->crop(30)->nl2br();


> So, I think we should tell people _not_ to use <f:if> as such Post
> Processors, else things might happen what the user does not expect.

like
{post.title->f:if(condition: settings.showTitle)}
?
or even
{post.title->f:else()->f:if(condition: settings.dontShowTitle)}
*harr* ;)

Bastian


More information about the TYPO3-project-5_0-general mailing list