Recursively descending down the tree (in template language)

Author Message

Gabriel Ambuehl

Tuesday 06 December 2005 9:24:49 am

I'm trying to render the subtree downwards from a given node.

Lack of proper function calls made me think I might get away with abusing include functionality but weird stuff happens when I do that:

<ul>
<li>current node<li>
{section var=child loop=children}
<lil>{include uri:"design:thistemplate.tpl" node=$child}</il>
{/section>
</ul>

Most notably, the </ul>s only get printed once the LAST include has been done. Why is that? And what is the proper way to print out a tree in treeform?

Visit http://triligon.org

Gabriel Ambuehl

Tuesday 06 December 2005 12:02:28 pm

Nevermind, after fixing the typos im my code it DOES work ;)

Visit http://triligon.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.