[Zope] dictionary from sequence-item

2006-06-19 Thread Alric Aneron
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 "none", but it gives me an

Re: [Zope] dictionary from sequence-item

2006-06-19 Thread Jonathan
approach would be to clean up the data in your list/dicts within the python script, before you get to the dtml method. Jonathan - Original Message - From: Alric Aneron To: zope@zope.org Sent: Monday, June 19, 2006 2:46 PM Subject: [Zope] dictionary from sequ

Re: [Zope] dictionary from sequence-item

2006-06-19 Thread Alric Aneron
pretty ugly. Another approach would be to clean up the data in your list/dicts within the python script, before you get to the dtml method. Jonathan - Original Message -From:AlricAneronTo: zope@zope.orgSent: Monday, June 19, 2006 2:46 PM Subject: [Zope] di

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