[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Variables and Advanced DTML
   
    webmaster@zope.org
     
    webmaster@zope.org
       
    Wed, 01 Jan 2003 05:08:03 -0500
    
    
  
A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/AdvDTML.stx#2-72
---------------
    Now we can create a DTML Method that uses the *tree* tag and our
    Scripts to draw a site map::
      <dtml-var standard_html_header>
      <h1>Site Map</h1>
      <p><a href="&dtml-URL0;?expand_all=1">Expand All</a> |
         <a href="&dtml-URL0;?collapse_all=1">Collapse All</a>
      </p>
      <dtml-tree branches="publicObjects" skip_unauthorized="1">
        <a href="&dtml-absolute_url;"><dtml-var title_or_id></a>
      </dtml-tree>
      <dtml-var standard_html_footer>
      % Anonymous User - Sep. 21, 2002 4:32 am:
       <dtml-with AnyRootFolder>
         <dtml-tree branches="getSubFolders">
           <a href="&dtml-absolute_url;"><dtml-var title_or_id></a>
         </dtml-tree>
       </dtml-with>
       The tree is rooted in current Folder, but not in AnyRootFolder.
       Why ???
      % Anonymous User - Sep. 26, 2002 5:32 am:
       (Zope 2.5.1 (source release, python 2.1, linux2), python 2.1.3, linux2)
       i needed:
       <dtml-tree branches_expr="publicObjects()" skip_unauthorized="1">
       to make it work.
      % Saman - Nov. 17, 2002 7:31 am:
       this dose not work..I can't figre it out
       the only thin I get is:
       Site Map
       Expand All  Collapse All
       it seems that the script is never called????
      % Anonymous User - Jan. 1, 2003 4:56 am:
       How can I do if I want elements of my array to display as tree?  For example,
       -Quotation
       | |-+Add Quotation
       | |-+Edit Quotation
       -Invoice
       | |-+Add Invoice
       | |-+Approve Invoice
       -Exit
      % Anonymous User - Jan. 1, 2003 5:08 am:
       And is it possible to parse a file with XML content as tree?  And how?