Feature #5118
Allow ViewHelpers to be Cascading in Shorthand-Syntax
100%
Description
If you want to do something like this:
<f:if condition="{h:isactive(current:singleLetter.uid,number:{h:counting(context:'newslettersLatest',increase:'true',show:'true')})}">
it is not possible since nesting of viewHelpers within shorthand syntax is not possible.
The attached patch adapts the regexes for letting this through and additionally parses the subViewHelpers correctly while working on the "argument-array" of the outer ViewHelper.
The attached patch ist against v4 fluid.
Files
Updated by Sebastian Kurfuerst over 12 years ago
- Status changed from New to Resolved
- Assignee set to Sebastian Kurfuerst
- % Done changed from 0 to 100
Hi,
we discussed this again, and for now came to two conclusions:
- we think it is a rather rare case to need things like this (actually I don't fully understand what the above line is supposed to do ;) )
- however, in some occasions, you need it.
Thus, we have opted in for a different way to go.
Now, every string in an array or in ViewHelper arguments is parsed as well.
Meaning, you now can do things like {my:viewHelper(argument1:'{f:myOtherViewHelper()')} in case you really need it, or even things like {key: '{firstname} {lastname}'} - however we think most of the times it still is some kind of "bad smell" :-)
Greets,
Sebastian