[TYPO3-mvc] creating nodes in FLUID - how to?

Martin Kutschker masi-no at spam-typo3.org
Fri Feb 5 09:26:42 CET 2010


Sebastian Kurfürst schrieb:
> Hi Masi,
> 
>> I've been playing a bit with the widget idea and came cross Franz's request to generate children on
>> the fly. In the example I have chosen "repeat for" to use a natural language construct different
>> from "for each". The main difference between them is that for-each will render it's children, but
>> repeat-for will create nodes to be rendered by its parent.
> I think this is not really needed.
> 
> As I understand your problem, you can use the
> "ViewHelperVariableContainer" to pass information between ViewHelpers -
> example:

This is good to know, but does it really solve the issue? The idea was a generic mechanism to add
tags/nodes.

Take a look at my example. After the "execution" of the "repeat" tag the XML could look like this:

<f:widget.tabs>
 <f:widget.tab title="static tab">
   Foo bar
 </f:widget.tab>
 <f:widget.tab title="dynamic tab 1">
   Foo bar A
 </f:widget.tab>
 <f:widget.tab title="dynamic tab 2">
   Foo bar B
 </f:widget.tab>
</f:widget.tabs>

That is the "repeat" has expanded to 2 new "tab" elements. And what's more, I don't want some
specialized code for the "tab" view helper. I guess I could achieve the desired effect with your
suggestion, but it wouldn't be a generic FLUID feature.

Masi


More information about the TYPO3-project-typo3v4mvc mailing list