[Zope] trees and namespaces newbie q

Thomas Weiner weiner@tu-harburg.de
Wed, 01 Mar 2000 11:03:11 +0100


Andy Heath schrieb:
> 
> Still much to learn.
> 
> I'm trying to write code to display a tree where different
> kinds of node require different display action.  Each node has a
> property (possibly acquired) "kind".  For nodes which reach
> the innermost <dtml-else> in the code below I want the dtml
> content rendered.  How can I do this?  If i refer in
> some way to PARENTS[0] then id goes up with it.
> 
> Please, please, please, what expression will work here
> to get the content of "id" rendered?
> 
> Code follows
> ------------
> <dtml-tree expr="lists" branches=objectValues sort=order>
> 
>         <dtml-if "meta_type=='Folder'">
>             <dtml-var title_or_id>
>         <dtml-else>
>             <dtml-if "kind=='discussion'">
>                     <A HREF="<dtml-var listURL>">
>                     <dtml-var title_or_id></A>
>             <dtml-else>
> 
>                          <dtml-var id>

try:  <dtml-var "_[_['id']]">

this should render the content of 'id'.
 

hth,
Thomas