trees and namespaces newbie q
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> </dtml-if> </dtml-if> <dtml-if listinfo> (<dtml-var listinfo>) </dtml-if> </dtml-tree> Andy -- ------------------------------------------------- Andy Heath a.k.heath@open.ac.uk The Open University +44 (0) 114 2885738
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
<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'.
Thankyou. However,to help my understanding how does this work? Hope you don't mind - I've mailed my other, unanswered tree question to you because I desparately need an answer. Andy -- ------------------------------------------------- Andy Heath a.k.heath@open.ac.uk The Open University +44 (0) 114 2885738
participants (2)
-
Andy Heath -
Thomas Weiner