Re: [Zope] dictionary from sequence-item

2006-06-19 Thread Jonathan
Itmight make your life easier if you used a dtml-let (WARNING: untested): dtml-in dictList="ScriptThatReturnsAListofDicts()" dtml-let aDict="_['sequence-item']" dtml-if "aDict.has_key('titled')" do something here But this is still pretty ugly. Another approach would be to clean up

Re: [Zope] dictionary from sequence-item

2006-06-19 Thread Alric Aneron
Thanks,I tried your suggestion Jonathan and I get this:Error Type: AttributeError Error Value: has_keyThanks anyway.I never used ZPT, I'm not sure how to approach it from that angle...would it be easy to do? (You mean tal and metal right?)Anyone have any other suggestions?ThanksJonathan

Re: [Zope] dictionary from sequence-item

2006-06-19 Thread David H
Alric Aneron wrote: Hello, I am looping through a list of dictionary objects using dtml-in... and within the dtml-in body I have: dtml-var "_.getitem('sequence-item')['titled']" missing="none" Some of the dictionaries in the list don't have 'titled' key so it should replace it with the word