[Zope] dtml-tree items filtering

Laurie Nason lnason@bcm.tmc.edu
Mon, 15 Jul 2002 09:50:20 -0500


Hi Dan,

When you call the dtml-tree method, you need to provide a
branches_expr=some_method - see
http://www.zope.org/Members/anthony/tree-coding-tricks or search the
zope.org site for dtml-tree for other how-to's. This method should only
return the objects you wish to see in the tree - so it does the filtering
for you.

hth

Laurie

-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Dan
Meszaros
Sent: Monday, July 15, 2002 8:42 AM
To: zope@zope.org
Subject: [Zope] dtml-tree items filtering


Hi,

i'm trying to solve this thing: i'm building a sitemap. i have folders, that
i
want to show, and want to hide the others. to differentaite them, i leave
the
title string empty for those folders i need to hide.

i used:

<dtml-tree sort=title>
  <dtml-if "id != 'acl_users'">
     <dtml-if "title!=''">
       <A HREF="&dtml-absolute_url;" target=right>
       <IMG border=0 SRC="<dtml-var icon>"><dtml-var title></A>
     </dtml-if>
  </dtml-if>
</dtml-tree>

but having a folder with no title and a subfolder in it, the above
gives me the expand-plus-sign in the tree (but show no icon) for that
folder.

can someone help?

regards
-dm



_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )