[Zope] dtml-in and getting the title of pictures

Pavlos Christoforou pavlos@gaaros.msrc.sunysb.edu
Sun, 19 Dec 1999 19:49:28 -0500 (EST)


On Mon, 20 Dec 1999, Jochen Haeberle wrote:

> Hi all,
> 
> I would like to step through all the pictures in a folder. I am using 
> the follwing code:
> 
>   <dtml-in "objectIds('Image')">
>     <table border=1><tr><td><IMG Src="<dtml-var sequence-item>l">
> <dtml-with "_['sequence-item']">
>    <dtml-if title></td></tr><tr><td align=center><i><dtml-var 
> title></i></dtml-if>
> </dtml-with>
>    </td></tr></table>

Jochen -

You could use objectValues instead of objectIds which will iterate through
the objects as before but make their attributes available in the local
namespace. Something like:

>   <dtml-in "objectValues('Image')">
>     <table border=1><tr><td><IMG Src="<dtml-var id>">
>    <dtml-if title></td></tr><tr><td align=center><i><dtml-var
> title></i></dtml-if>
>    </td></tr></table>


Merry Xmass

Pavlos