Question about accessing properties of images
I have some code where I am in a folder and am accessing an image in that folder by name (passed into the page as an argument named "pic" in the URL). I am trying to access a property ("desc") of the image object ("pic") and am only able to do it using the following code: (Note that I am doing this from the folder containing the image object.) <dtml-in objectItems prefix=p > <dtml-if expr="p_key == pic"> <dtml-var desc html_quote> </dtml-if> </dtml-in> This seems a bit wasteful to go through a <dtml-in> loop in order to retrieve the "desc" property from the image. Is there an easier way to do this?
Kevin Carlson writes:
I have some code where I am in a folder and am accessing an image in that folder by name (passed into the page as an argument named "pic" in the URL). I am trying to access a property ("desc") of the image object ("pic") and am only able to do it using the following code: (Note that I am doing this from the folder containing the image object.)
<dtml-in objectItems prefix=p > <dtml-if expr="p_key == pic"> <dtml-var desc html_quote> </dtml-if> </dtml-in> "<dtml-var expr="pic.desc" html_quote>" does not work? What happens/goes wrong?
Dieter
participants (2)
-
Dieter Maurer -
Kevin Carlson