Hi! how come this doesn't work i pass this the variable fold with the url "http://www.somelink.com/treeview.html?fold=month" . . . <dtml-tree fold branches_expr="objectValues(['Folder', 'File'])"> <dtml-if "meta_type=='Folder'"> <IMG SRC="<dtml-var icon>" BORDER=0> <dtml-var title> <dtml-else> <A HREF="<dtml-var tree-item-url>" target="_blank"><IMG SRC="<dtml-var icon>" BORDER=0> <dtml-var id></A> </dtml-if> </p> </dtml-tree> __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com
Try <dtml-tree "_[fold]" branches_expr="objectValues(['Folder', 'File'])"> And incase the folders don't have a title, maybe you should use <dtml-var title_or_id> instead of <dtml-var title> And probably should html quote just to stay in the habit ;) <dtml-var title_or_id html_quote> or &dtml-title_or_id; michael.taag wrote:
Hi!
how come this doesn't work
i pass this the variable fold with the url
"http://www.somelink.com/treeview.html?fold=month"
. . . <dtml-tree fold branches_expr="objectValues(['Folder', 'File'])"> <dtml-if "meta_type=='Folder'"> <IMG SRC="<dtml-var icon>" BORDER=0> <dtml-var title> <dtml-else> <A HREF="<dtml-var tree-item-url>" target="_blank"><IMG SRC="<dtml-var icon>" BORDER=0> <dtml-var id></A> </dtml-if> </p> </dtml-tree>
__________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
thanks! it works! of course, making it work doesn't satisfy me how it works makes me more satisfied. What's the "_[ ]" characters for? What do they do? Why is it good pratice to have html quote? thanks! sorry for my ignorance =) --- Chris Beaven <chris@d-designz.co.nz> wrote:
Try <dtml-tree "_[fold]" branches_expr="objectValues(['Folder', 'File'])">
And incase the folders don't have a title, maybe you should use
<dtml-var title_or_id> instead of <dtml-var title>
And probably should html quote just to stay in the habit ;) <dtml-var title_or_id html_quote> or &dtml-title_or_id;
michael.taag wrote:
Hi!
how come this doesn't work
i pass this the variable fold with the url
"http://www.somelink.com/treeview.html?fold=month"
. . . <dtml-tree fold branches_expr="objectValues(['Folder', 'File'])"> <dtml-if "meta_type=='Folder'"> <IMG SRC="<dtml-var icon>" BORDER=0> <dtml-var title> <dtml-else> <A HREF="<dtml-var tree-item-url>" target="_blank"><IMG SRC="<dtml-var icon>" BORDER=0> <dtml-var id></A> </dtml-if> </p> </dtml-tree>
__________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
__________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com
michael.tañag wrote:
thanks! it works! of course, making it work doesn't satisfy me how it works makes me more satisfied. What's the "_[ ]" characters for? What do they do?
_[string] gets the object from the namespace (the "_"). I.e. <dtml-var spam> is the same (more or less) than <dtml-var "_['spam']">. There are some subtle difference though which can be read up on the net.
Why is it good pratice to have html quote?
You want to rule out the possiblity that someone could inject valid html/javscript into your page, to prevent "Cross site scripting" attacks (-> google) for instance. cheers, oliver
participants (3)
-
Chris Beaven -
michael.ta�ag -
Oliver Bleutgen