[Zope] newbie tree code problem
Andy Heath
a.k.heath@open.ac.uk
Tue, 29 Feb 2000 20:44:17 +0000
ok, the plan was to be able to make parts of the
tree visible/non-visible by setting a boolean on
the node.
With this structure
lists
+ another
feedback
+ sillytest
With a boolean visible=false on sillytest
my code (below) produces
feedback
-
another
(the titles of these anyway). That is, I get
a hole where sillytest goes, obviously because
the +/- for the node is produced when visiting
the inner part of the <dtml-tree ...> before the
<dtml-if>.
How can I get around this? It seems to me that there
must be some expression I can put in the <dtml-tree ...>
part otherwise there could be no general solution.
What expression would work?
Here is my code
<dtml-tree expr="lists" branches=objectValues>
<dtml-if visible>
<dtml-if "meta_type=='Folder'">
<dtml-var title_or_id>
<dtml-else>
<A HREF="<dtml-var listURL>">
<dtml-var title_or_id></A>
</dtml-if>
<dtml-if listinfo>
(<dtml-var listinfo>)
</dtml-if>
</dtml-if>
</dtml-tree>
PLEASE COPY to a.k.heath@open.ac.uk (can't wait
for the digest - once per day)
Andy
--
-------------------------------------------------
Andy Heath a.k.heath@open.ac.uk
The Open University +44 (0) 114 2885738