You can create a custom modifier that takes a template name and a set
of named arguments, it loads and executes the template, passing in the
arguments. That's how I've done it in the past.<br>
<br>
It's in the mailing list archives I think,<br>
<br>
F<br><br><div><span class="gmail_quote">On 9/1/05, <b class="gmail_sendername">Josh Narins</b> <<a href="mailto:josh@narins.net">josh@narins.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> I've got a tree, with arbitrary depth, like..<br>><br>> {<br>> text => 'This is the top',<br>> sort => [5,3,7],<br>> children =><br>> 3 => {<br>> text => 'This should be second',
<br>> sort => [4,6],<br>> children {<br>> 4 => { text=>'a leaf',},<br>> 4 => { text=>'another leaf',},<br>> },<br>> 5 => ...<br>
> 7 => ...<br>> }<br>> }<br>><br>> I hope you get the idea.<br>><br>> How do I get this to work in Petal?<br>><br>> I figure I should be able to do it with a single template.<br>><br>
> myself.xml<br>> ==========<br>><br>> <table><br>> <tr><br>> <td petal:content="object/text"><br>> This is dummy text<br>> </td><br>> <td petal:repeat="SOMETHING HERE">
<br>> <xi:include href="./myself.xml" /><br>> </td><br>> </tr><br>> </table><br>><br>> What should that repeat be? I can do it with "each:" but then I don't
<br>> get any order. I want the order to be that as described in the sort<br>> array ref.<br>><br>> How does anyone handle recursive trees?<br><br>No one has recursive tips?<br><br><br></blockquote></div><br>