[TYPO3-mvc] Fluid - using an array in condition?

Martin Kutschker masi-no at spam-typo3.org
Mon May 10 21:24:07 CEST 2010


Sebastian Kurfürst schrieb:
> Hey Stefan,
> 
>> But it seems that "{checkedItems.index}" is not equivalent to
>> {checkedItems.0}, {checkedItems.1}, ...
>> Is there another syntax, or is it not possible?
> Right now, that's not possible without a custom ViewHelper.
> 
> The reason is that you would like to write {checkedItems.{index}}, which
> is not supported right now... And from the parser side, I am not sure if
> this still makes the language unambiquous. That's why I cannot guarantee
> this feature will be implemented in the upcoming time.

Would this help the parser?

{checkedItems[{index}]}

IIRC the parser uses regexps. Perhaps it's time to move on to a real lexer to allow for a more
versatile syntax. eg I would like to see numeric arrays without the need to spell out the indices:
['a', 'b', 'c'] instead of {0: 'a', 1: 'b', 2:'c'}.

Masi


More information about the TYPO3-project-typo3v4mvc mailing list