[Zope] Tree/nav has me perplexed

Bruce Elrick belrick@saltus.ab.ca
Wed, 08 Sep 1999 13:49:14 -0600


Howdy all..

I've read through the DTML Guide section on the tree tag as well as Tad
Murphy's How-To, but I still can't get the tree tag to do what I want.

I have folders that are meant to be part of the site hierarchy as well as
folders that are simply used to clean up the management view of the site.  For
example, I have an Images folder at the top, but I don't expect users to
browse to http://site/Images, so I don't want that folder to appear in the nav
tree.  If I add a property called 'hidden' to such folders and use the
following code:
<dtml-tree
  expr="PARENTS[0]"
  skip_unauthorized=1 sort=title_or_id
  branches_expr="objectValues(['Folder', 'Squishdot Site'])"
  >
  <dtml-if hidden>
     <!--Skipping hidden-->
  <dtml-else>
    <a href="<!--#var absolute_url-->"><!--#var id--></A>
  </dtml-if>
</dtml-tree>
Then the tree is still rendered with the 'hidden' folders but with no text
etc.  That is, it takes up space in the tree and shows a plus if it has
subfolders.  What I would like is that such folders (and their subfolders) are
not rendered at all.

I'm thinking I have to provide some code in place of the
objectValues(['Folder', 'Squishdot Site'])
that returns the same minus said items that have 'hidden' as a property,
but I don't understand whether this 'code' would be a DTML method or an
external method, or what 'type' of this it would return (a list?).

Cheers and thanks...
Bruce
--
Bruce Elrick, Ph.D.                       Saltus Technology Consulting Group
Cell:     (403) 870-4429
Personal: belrick@home.com                          IBM Certified Specialist
Business: belrick@saltus.ab.ca          ADSM, AIX Support, RS/6000 SP, HACMP