[Zope] Question about accessing properties of images

Kevin Carlson khcarlso@bellsouth.net
Mon, 18 Feb 2002 21:20:29 -0500


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?