Problem with attributes and/or aquisition?
OK, in a dtml-in iteration of PARENTS[-1], I have the following code: ... <dtml-if "meta_type=='Folder'"> <dtml-if "_.hasattr('_[id]','SiteMenu')"> <dtml-in "_[id].objectValues(['Folder'])"> <dtml-if "_.hasattr('_[id]','SiteMenu')"> ...do stuff with RXML and tables ... And In my root folder, I have anumber of folders, some with SiteMenu, some without. Problem: None of the folders appear in my menulist. If I negate the condition (<dtml-if "not ...">), all my folders show up. I can't use <dtml-if SiteMenu> because this will be called from within a folder (sometimes) that has that property set. I don't recall having this problem before .. but it has been a long night/morning. Anyone know what the heck I am missing (Besides several hours of needed sleep)? IIRC -- "They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown." -- Carl Sagan
At 13:48 22-11-99 , Bill Anderson wrote:
OK, in a dtml-in iteration of PARENTS[-1], I have the following code: ... <dtml-if "meta_type=='Folder'"> <dtml-if "_.hasattr('_[id]','SiteMenu')"> <dtml-in "_[id].objectValues(['Folder'])"> <dtml-if "_.hasattr('_[id]','SiteMenu')"> ...do stuff with RXML and tables ...
Make that: <dtml-if "_.hasattr(_[id],'SiteMenu')"> at least (no single quotes around _[id]). -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | T: +31 35 7502100 F: +31 35 7502111 | mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ---------------------------------------------
participants (2)
-
Bill Anderson -
Martijn Pieters