Feature #5118

Allow ViewHelpers to be Cascading in Shorthand-Syntax

Added by Steffen Ritter almost 6 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2009-10-26
Priority:Must have Due date:
Assigned To:Sebastian Kurfuerst % Done:

100%

Category:Core
Target version:-
Has patch:

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.

allowSubViewHelper.diff Magnifier (5.2 kB) Steffen Ritter, 2009-10-26 13:58

Associated revisions

Revision 3ff7f92a
Added by Sebastian Kurfuerst almost 6 years ago

[!!!][+FEATURE] Fluid: Strings inside Arrays and the inline notation are now parsed by Fluid as well. This enables things like {fullName: '{firstName} {lastName}'} - thus, everything can be nested inside arrays and the ViewHelper inline notation arguments. This is a breaking change in case you used literal {...} inside your arguments, but not else. Relates to #5118.

History

#1 Updated by Sebastian Kurfuerst almost 6 years ago

  • Status changed from New to Resolved
  • Assigned To 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

Also available in: Atom PDF