Feature #9956

Allow updating of view-variables

Added by Robert Vock about 11 years ago. Updated over 10 years ago.

Status:
Rejected
Priority:
Could have
Assignee:
-
Category:
ViewHelpers
Target version:
-
Start date:
2010-09-28
Due date:
% Done:

0%

Estimated time:
Has patch:

Description

It would be nice, if it is possible to update variables within views.

Working with the AliasViewHelper, I got an error "Duplicate variable declarations", because I was using the same name.

But when I want to output a tree and render a section recursively, it would be nice to update variables.

For example code like this could work:

<f:section name="tree">
  <ul>
    <f:for each="{entries}" as="entry">
    <li>
      {entry.name}
      <f:if condition="{entry.hasChildren}">
        <f:then>
          <f:alias map="{entries: entry.getChildren}">
            <f:render section="tree" />
          </f:alias>
        </f:then>
      </f:if>
    </li>
    </f:for>
  </ul>
</f:section>

#1

Updated by Sebastian Kurfuerst over 10 years ago

  • Status changed from New to Rejected

you can use partials which recursively call themselves in such situations.

Also available in: Atom PDF