[TYPO3-mvc] Fluid f:if question, other viewHelpers
Franz Koch
typo3.RemoveForMessage at elements-net.de
Sat Dec 4 12:18:46 CET 2010
Hey,
> just a question why is something like the following not allowed?
>
> <f:if condition="{myvar}=='test'">
> Displayed if myvar equals test
> </f:if>
>
> I found that it's not allowed, but not how to solve that (current
> idea:viewhelper ... :), or why it's not allowed.
In general it is allowed, but the boolean parser is not up to it yet. A
common workaround is to implement a boolean getter method in your model,
like getIsTest() or something like that.
> Another question:
> Is it planned to implement things like substr, strtolower, strtoupper?
> (sometimes needed to autogenerate links to assets) ;) Otherwise i would
> do it on my own for my extension.
I could have sworn that there is a "transform" viewHelper somewhere
that's able to shift cases (ucfirst, strtolower etc.). If it's missing,
there's a good chance that those are already available on the viewHelper
incubator.
--
kind regards,
Franz Koch
More information about the TYPO3-project-typo3v4mvc
mailing list