Variable rendering in a <dtml-with> statement
Hi! Guess you people are tired of me asking so many questions - sorry. Hopefully this one will be of the last I send (I'm nearly there). I have this code: <dtml-if foldername> <dtml-with PARENTS[-1].Documents.foldername> <--- Doesn't work <dtml-in "objectValues(['Folder','File'])" skip_unauthorized=1> <dtml-if "meta_type=='Folder'"> <a href="?foldername=<dtml-var id>"> <--- foldername passed back <img src="<dtml-var icon>"> this method </a> <dtml-var id><br> <dtml-else> <img src="<dtml-var icon>"> <dtml-var id><br> </dtml-if> </dtml-in> </dtml-with> </dtml-if> What I try to do is to show a persons hieracy of folders and files starting at the top level. Thereafter I will add 'copy', 'cut', 'paste', 'delete' and 'rename' functions to the view (sort of like the manage_workplace one). Basically I'm stuck here - could someone please tell me how (if possible) to fix the above code to a working one, or poit me to a working scheme? Many thanks in advance! Sture Lygren
Sture Lygren wrote:
Hi!
Guess you people are tired of me asking so many questions - sorry. Hopefully this one will be of the last I send (I'm nearly there).
I have this code:
<dtml-if foldername> <dtml-with PARENTS[-1].Documents.foldername> <--- Doesn't work
because it's not in quotes (it's an expression). -Michel
Hi! I tried both with and without quotes, but none works. I get an attribute error on 'foldername' Maby I can do this another way, but then I need a way to reference the 'object path' up to and including a folder referenced by 'this()'. The 'object path' will the be the one I use in the with-statement. like this: <a href="?object_path=<dtml-var "'how_do_i_reference_this_path'.this()">"><dtml-var id></a> If anyone understand what I try to do and know how to get it working then please help! Thanks Sture Lygren Michel Pelletier wrote:
Sture Lygren wrote:
Hi!
Guess you people are tired of me asking so many questions - sorry. Hopefully this one will be of the last I send (I'm nearly there).
I have this code:
<dtml-if foldername> <dtml-with PARENTS[-1].Documents.foldername> <--- Doesn't work
because it's not in quotes (it's an expression).
-Michel
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(Related lists - please, no cross posts or HTML encoding!
To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Michel Pelletier -
Sture Lygren