Feature #9956

Allow updating of view-variables

Added by Robert Vock almost 5 years ago. Updated about 4 years ago.

Status:Rejected Start date:2010-09-28
Priority:Could have Due date:
Assigned To:- % Done:

0%

Category:ViewHelpers
Target version:-
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>

History

#1 Updated by Sebastian Kurfuerst about 4 years ago

  • Status changed from New to Rejected

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

Also available in: Atom PDF