Currently I'm using a tree tag which looks like: <!--#tree branches_expr="objectValues(['Folder'])"--> <A HREF="<!--#var tree-item-url-->"> <!--#var title_or_id--> </A> <!--#/tree--> (stolen from the ZDP FAQ). I'd like to modify it so that the root of the tree is fixed (as in the help system), and so that only folders which do not have the 'hidden' property set are shown. Any hints? --david ascher
Hi David, Just set the name="<root-object>". I don't know if this is the official way but it works for me. You will still have some problems with URL's not mapping correctly, I include my meny-method that might give you an idea how to solve it. Best Regards, Johan Carlsson [demo1 URL is "/Zope/demo1"] [<!--#var expr="_.string.split(URL,'/')[-1]"--> gets the previous method used, cause I use multiple templates.] <snip-start> <!--#tree name="demo1" --><font size="1"> <!--#if tree-item-expanded--> <STRONG> <!--#endif--> <SPAN> <font size="2"><A HREF="<!--#var "BASE2"-->/<!--#var tree-item-url-->/<!--#var expr="_.string.split(URL,'/')[-1]"-->"><!--#var title--></a> </font> <font size="1"> <A HREF="<!--#var "BASE2"-->/<!--#var tree-item-url-->">[1]</a> <A HREF="<!--#var "BASE2"-->/<!--#var tree-item-url-->/mall2">[2]</a> <A HREF="<!--#var "BASE2"-->/<!--#var tree-item-url-->/codeview">[cv]</a> </font> </SPAN> <!--#if tree-item-expanded--> </STRONG> <!--#endif--> </font> <!--#/tree--> </snip-stop>
Currently I'm using a tree tag which looks like: <!--#tree branches_expr="objectValues(['Folder'])"--> <A HREF="<!--#var tree-item-url-->"> <!--#var title_or_id--> </A> <!--#/tree-->
(stolen from the ZDP FAQ).
I'd like to modify it so that the root of the tree is fixed (as in the help system), and so that only folders which do not have the 'hidden' property set are shown.
Any hints?
--david ascher
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(For developer-specific issues, use the companion list, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
On Tue, 20 Apr 1999, Shaolin wrote:
Hi David, Just set the name="<root-object>". I don't know if this is the official way but it works for me. You will still have some problems with URL's not mapping correctly,
Well, that works, except that I can't refer to the root object. If I refer to a subfolder, it's ok. Setting name="" doesn't work, nor does name="." I also get URL corruption. Hmm... --david PS: What's the simplest way to set up redirects/symlinks?
I'd like to modify it so that the root of the tree is fixed (as in the help system), and so that only folders which do not have the 'hidden' property set are shown.
I figured out the last part: <!--#tree branches_expr="objectValues(['Folder'])"--> <!--#unless hidden--> <A HREF="<!--#var tree-item-url-->"> <!--#var title_or_id--> </A> <!--#/unless--> <!--#/tree-->
I'd like to modify it so that the root of the tree is fixed (as in the help system), and so that only folders which do not have the 'hidden' property set are shown.
BTW. Another thing that doesn't work so well is that it doesn't keep it's state trought the levels. //johan carlsson
Try http://www.zope.org/Documentation/HowTo/DTML/treetag for possible ideas about always referencing a base Folder/object Karl Putland
However:
From the treetag howto;
<!--#var "meny1(PARENTS[-1],REQUEST)"--> works well with sublevels. //johan carlsson
I found that using; <!--#var "meny1(demo1,REQUEST)"--> demo1 being the root-object from where to show the tree. Its works great :-) //johan carlsson
BTW. Another thing that doesn't work so well is that it doesn't keep it's state trought the levels. //johan carlsson
Try http://www.zope.org/Documentation/HowTo/DTML/treetag for possible ideas about always referencing a base Folder/object Karl Putland
However:
From the treetag howto;
<!--#var "meny1(PARENTS[-1],REQUEST)"-->
works well with sublevels.
participants (2)
-
David Ascher -
Shaolin