[Zope] getting the keys:values in a propertyItems() object
Jaroslav Lukesh
lukesh at seznam.cz
Thu Mar 6 19:41:22 EST 2008
At my management tree page I use following code where object is pushed into
namespace by dtml-in, so inspire yours here:
<dtml-in "objectItems(['Folder', 'LinkedFolder','PortableHole',
'ZipFolder' ])" sort=id skip_unauthorized>
...
<dtml-in propertyMap mapping>
<dtml-unless "propertyLabel(id) == 'title'">
<font color="red"><b><dtml-var id></b></font>[<span
title="<dtml-var "getProperty(id)" html_quote>"
><dtml-var "_.str(getProperty(id))[:10]" html_quote
><dtml-if "_.len(_.str(getProperty(id))) > 10">...</dtml-if
></span>]
</dtml-unless>
</dtml-in>
...
</dtml-in>
You should use dtml-with to push object into namespace.
Regards, JL.
----- Original Message -----
From: Kamal Hamzat
I have this lines of dtml methods.
<dtml-call "REQUEST.set('xx', _.getitem('080211'))">
<dtml-var "xx.propertyItems()">
Which rendered these Keys:Values below
[('title', "The man Wants Refinery For Living"),
('lastEditDate', DateTime('2008/02/11 11:49:26.254 US/Eastern')),
('EpozDocumentTemplate', ''), ('author', 'By Chesal Chesal'),
('summary', "He has directed that further investment in private refineries
be targeted at the axis which consumes 15 million litres of fuel per day,
more than half the country's total.")]
Please, how do I extract each key with its corresponding value. For example
title : The man Wants Refinery For Living.
More information about the Zope
mailing list