|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
DallasRPI Smarty n00b
Joined: 06 Oct 2003 Posts: 2
|
Posted: Mon Oct 06, 2003 8:34 pm Post subject: Recursion |
|
|
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 |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Mon Oct 06, 2003 8:36 pm Post subject: |
|
|
This topic is featured in this thread. |
|
Back to top |
|
DallasRPI Smarty n00b
Joined: 06 Oct 2003 Posts: 2
|
Posted: Tue Oct 07, 2003 1:27 pm Post subject: |
|
|
Hey thanx alot! |
|
Back to top |
|
|
|
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
|