Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Recursion

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
DallasRPI
Smarty n00b


Joined: 06 Oct 2003
Posts: 2

PostPosted: Mon Oct 06, 2003 8:34 pm    Post subject: Recursion Reply with quote

I'm trying to figure out how to do recursion using smarty. The issue is I'm creating a windows explorer type view of a filesystem using li and ul tags to do the folders in the left pane and i dont want to print the close ul tags until all its inner li tags are closed, i could do this in phplib but im having trouble here. How should my data structure look and how do i traverse it? Here is an example of the outut should be.

<ul>
<li><a class="open" href="explore.php?id=2153853">A - Documents</a></li>
<ul>
<li><a class="open" href="explore.php?id=2151863">DALLS</a></li>
<ul>
<li><a class="open" href="explore.php?id=2151922">Analyst Investigation</a></li>
<ul>
<li><a href="explore.php?id=3206586">Additional Scanned Documents</a></li>
<li><a href="explore.php?id=2151849">Email</a></li>
<li><a href="explore.php?id=3198100">Hard Copy Spinning</a></li>
<li><a class="open" href="explore.php?id=3189433">Example</a></li>
<ul>
<li><a href="explore.php?id=3189434",">IMAGE_1</a></li>
</ul>
</ul>
<li><a href="explore.php?id=2150776">Investigation</a></li>
</ul>
<li><a href="explore.php?id=2154609">ABC</a></li>
</ul>
<li><a href="explore.php?id=2150997">Logs and Indices</a></li>
<li><a href="explore.php?id=3186144">Redacted Documents</a></li>
</ul>
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Mon Oct 06, 2003 8:36 pm    Post subject: Reply with quote

This topic is featured in this thread.
Back to top
View user's profile Send private message
DallasRPI
Smarty n00b


Joined: 06 Oct 2003
Posts: 2

PostPosted: Tue Oct 07, 2003 1:27 pm    Post subject: Reply with quote

Hey thanx alot!
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP