[Zope] Knowing enough to get into trouble

Martijn Pieters mj@antraciet.nl
Sat, 12 Jun 1999 21:57:26 +0200


At 23:26 8-6-99 , Zope on a Rope wrote:
>I've got a mildly modified tree control that I stole from Zbook that does
>everything a tree should do. I've also got at least one folder I'd like to
>hide from the tree. Right now I'm just hiding a folder programatically by
>starting its title with 'zzz'.
>
>	<!--#if expr="title[0:3] != 'zzz'"-->
>	... show the tree
>
>So far, so good. It doesn't show up on the tree display.
>
>But I'm one of those anal retentives that likes to keep things tidy. I'd
>like to create a sub directory to hold my images, etc., and if I nest the
>folders, the little +/- sign shows up. If the folder title starts with
>'zzz', it even hides the folder but shows a heirarchy of +/- gizmos.

First of all, glad to see someone finds my code useful =)

Second, sorry for the late answer, I became a father again last week, I am
a bit behind with my email.

The ZBook tree displays only documents of type DTML Document, and Folder,
that's what branches_expr="objectValues(['Folder', 'DTML Document'])"
means. This also means that _DTML Methods_ are not included. So if you
recreate the zzz document as a DTML Method, it will be excluded.

If this raises some inposibilities, you should try and exclude it at the
branches_expr level. You could do this by writing an external method, that
calls objectValues(['Folder', 'DTML Document']) and removes any unwanted
documents from this list before returning this, and then using this
external method in branches, or branches_expr if you need to pass variables.

-- 
Martijn Pieters, Web Developer 
| Antraciet http://www.antraciet.nl 
| Tel: +31-35-7502100 Fax: +31-35-7502111 
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj 
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 
------------------------------------------