[TYPO3-mvc] ViewHelpers Setting/Updating variables restriction
Sebastian Kurfürst
sebastian at typo3.org
Wed Oct 20 11:37:58 CEST 2010
Hey Robert,
> Each array entry has a key "name" and can have a key "children" with children for this entry.
> I thought of defining a section "renderTree" and call it recursively:
That's perfectly possible, try the following:
> <f:section name="renderTree">
> <ul>
> <f:for each="tree" as="entry">
> <li>{entry.name}
> <f:if "{entry.children}">
> <f:then>
Throw out the following three lines:
> <f:alias map="{tree: entry.children}">
> <f:render section="renderTree" />
> </f:alias>
And replace them by:
<f:render section="renderTree" arguments="{tree: entry.children}" />
That works with Fluid included in the newest stable TYPO3 release.
> </f:then>
> </f:if>
> </li>
> </f:for>
> </ul>
> </f:section>
> Is there any way to write comments, that do not appear in the rendered source?
> I like to comment my templates, but I do not like it when all visitors of my page can see them.
> That's why I wrote a CommentViewHelper, which does not render it's children. But it is a lot of code to write for simple comments:
> <v:comment>This comment will not appear in the HTML-Source</v:comment>
Yep, that's the way to go. I agree that this is more to write than in
smarty, but on the other hand it clearly states that it is a comment --
nothing more, nothing less.
We should include this ViewHelper in the standard distribution...
Greets,
Sebastian
More information about the TYPO3-project-typo3v4mvc
mailing list