Feature #5118

Allow ViewHelpers to be Cascading in Shorthand-Syntax

Added by Steffen Ritter over 12 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Must have
Category:
Core
Target version:
-
Start date:
2009-10-26
Due date:
% Done:

100%

Estimated time:
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.


Files

allowSubViewHelper.diff (5.23 KB) allowSubViewHelper.diff Steffen Ritter, 2009-10-26 13:58
#1

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

Also available in: Atom PDF