Knowing enough to get into trouble
I've learned a bunch about Zope after scanning all the messages that come in -- this list is ripe with smart people! Thank you all for sharing what you know. That said, it's still populated with one dumbo who isn't too good at applying the bones tossed my way. I still have a little problem that I'd like to get to the bottom of. 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. It was suggested that I add 'skip_unauthorized=1' to my tree but I couldn't get that to work. I went to my resources folder, went to security and unchecked "Acquire permission settings?". That didn't work for me as the unauthenticate user was prompted with an auth box. I'd like to be able to show/hide other items, too. So if somebody can cattle prod me into getting the latter to work, I'd be grateful. Heck, I'll even write the experience up for ZDP if they'll accept my words and spaces! Cheers, Jules
Zope on a Rope wrote: [that mysterious tree tag strikes again]
I'd like to be able to show/hide other items, too. So if somebody can cattle prod me into getting the latter to work, I'd be grateful. Heck, I'll even write the experience up for ZDP if they'll accept my words and spaces!
Aha, dangerous statements. :) The ZDP will gladly accept your words and spaces! Unfortunately I do not know an answer to your question. :) Regards and good luck! Martijn
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 ------------------------------------------
participants (3)
-
Martijn Faassen -
Martijn Pieters -
Zope on a Rope