[Zope] Tree questions

Shaolin trafik@torped.se
Tue, 20 Apr 1999 01:52:19 +0200


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">&nbsp;&nbsp;
    <A HREF="<!--#var "BASE2"-->/<!--#var tree-item-url-->">[1]</a>&nbsp;
    <A HREF="<!--#var "BASE2"-->/<!--#var tree-item-url-->/mall2">[2]</a>&nbsp;
    <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 )
>