At 18:03 23-9-99 , Ethan Fremen wrote:
I may be overlooking the obvious, but what am I doing wrong here?
<dtml-tree content branches_expr="objectValues(['Folder', 'DTML Document'])" sort=order > <dtml-if expr="meta_type == 'Folder'"> <dtml-var title_or_id> <dtml-else> <dtml-if expr="id == 'fozcoa'"><dtml-var fozgif></dtml-if> <dtml-if expr="id == 'cnart'"><dtml-var cnartgif></dtml-if> [snip stuff that generates URL] <dtml-var title_or_id></a>
The tree displays, but I cannot get the images (fozgif & cnartgif) to display. There is a document inside content with the id fozcoa and another with the id cnart.
On DTML Documents, id is a method. You are comparing a method object to a string, so this will always turn out to be false. Test for id() == 'fozcoa'. -- 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 ---------------------------------------------