[Zope] newbie question about nested <dtml-in> tags

John P. Looney john@antefacto.com
Wed, 19 Jun 2002 14:54:47 +0100


 I have some code to generate some simple folders, for a side tree-bar.
"foldername" contains all my site data.

 The idea is that as I walk through the folders in "foldername", I print
out a link to it, and then if I happen to be in that folder at the moment,
I print out a list of all its subfolders etc.

 However, I don't think that I can access the "id" variable as an object,
can I ? What should I be trying to do ? Is there a better way of doing it
than this ? (which nearly works!)

<a href="/">home</a>
<dtml-in expr="foldername.objectValues(['Folder'])">
    <a href="<dtml-var absolute_url>"><dtml-var title></a>
    <dtml-if expr="'/foldername/' + id == REQUEST.PATH_TRANSLATED">
       <ul>
       <dtml-in expr="id.objectValue(['Folder'])">
         <li><a href="<dtml-var absolute_url>"><dtml-var title></a>
       </dtml-in>
       </ul>
    </dtml-if>
<p><dtml-var id></p>

-- 
_______________________________________
John Looney             Chief Scientist
a n t e f a c t o     t: +353 1 8586004
www.antefacto.com     f: +353 1 8586014