[Zope] propertyItems and in

Jim Washington jwashin@vt.edu
Mon, 15 Nov 1999 00:19:47 +0000


I get ids only with propertyItems, too.

To do what you need:

<dtml-in "propertyIds()[6:32]">
<dtml-var sequence-item> 
<dtml-var "_.getitem(_['sequence-item'])">
</dtml-in>

sequence-item has the id, and _.getitem(_['sequence-item']) will get you
the value of the thing.

Good luck with your demo.

-- Jim Washington

Oscar Picasso wrote:
> 
> In the ZQR I read:
> 
> propertyItems
> Returns a list of (id, property) tuples.
> 
> So in a DTML Document I tried:
> <dtml-in "propertyItems()[6:32]">
>   <dtml-var sequence-item>
> </dtml-in>
> 
> It return the list of the actual properties. I thought that sequence-item
> would return somthing like:
> (id, value) so I could access the id with sequence-item[0] and the value
> with sequence-item[1].
> Where am I wrong? I need to render both the property id and the property
> value inside the same <dml-in ...> iteration.
> 
> Your comments will be greatly appreciated. Monday I have to show a demo of
> my little Zope application for a more important project. I'm a little
> nervous...
> 
> ******************************************************
> Oscar Picasso
> picasso@videotron.ca
> ******************************************************
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
>           No cross posts or HTML encoding!
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

-- 
Regards,

-- Jim Washington