[TYPO3-mvc] Condition in if-ViewHelper quesion
Christian Zenker
christian.zenker at 599media.de
Tue Aug 24 16:04:00 CEST 2010
On Tue, 24 Aug 2010 15:24:26 +0200, Thomas Hempel
<thomas at typo3-unleashed.net> wrote:
> Hi,
>
> I'm currently trying to understand how the the if-ViewHelper works.
> Unfortunately I can't find the place where the condition argument is
> parsed and checked. Can somebody please point me to a direction?
Have a look at Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode.
>
> The background for this question is that I pass a negative value to a
> variable and check that in an condition.
Wow, I thought the built-in was at least able to treat numbers - but
obvoiusly it is not (see the regexp member variable of the class).
What I would recommend is writing a ViewHelper that returns true or false
and use it with the inline notation as condition. That should work until
fluid is updated.
Christian.
More information about the TYPO3-project-typo3v4mvc
mailing list