[Zope] How to create "Locked" folder tree?

Chip Vanek chip@upcast.com
Mon, 14 Feb 2000 21:29:38 -0800


Searched many, many postings and found some hints but no solutions yet.

The trick below works if you call the method from a branch below.
 <dtml-tree expr="PARENTS[-2]" branches_expr="objectValues('Folder')"
sort=id>
      <a href="<dtml-var tree-item-url>/index_html">
        <dtml-var title_or_id></a>
 </dtml-tree>

The problem is I want to use this tree as a navigator for one branch of
the site while users may be down in another branch of the site at the
same depth (like the Members area).  The code above will paint a tree
with tortured URLs if the user1 is viewing their index_html page.

http://host.com/SiteRoot/
                         Pub/
                            Folder1
                            Folder2
                              Branch1
                              Branch2
                            Folder3
                               .....

                        /Members/
                               user1
                                    index_html
                               user2
                                 .....
>
>I need to "lock" aquisition to all me to display a tree of folders. I
>have a tree navigation control called by standard_html_header that I
>would like to always show a subtree of my site.  I think that I have
>to limit the namespace but can't seem to get the syntax right.  How
>do I lock the root of the tree tag to one specific place in the
>heirarchy?  My latest code attempt is below:
>
>
><dtml-with "PARENTS[-1].SiteRoot.Pub">
>    <dtml-tree Pub branches_expr="objectValues('Folder')" sort=id>
>         <a href="<dtml-var tree-item-url>/index_html">
>             <dtml-var title_or_id></a>
>    </dtml-tree>
></dtml-with>
>
>Thanks for your help.
>
>Chip Vanek
>chip@upcast.com
>
>