[Zope] get objects DTML Document having Property order...
Hello, I want to do : dtml-in "objectValues('DTML Document')" sort=order ... /dtml-in I have some DTML Documents which don't have the property "order", and I don't want to consider those documents in my loop. But if I put the "sort=order" option, Zope raises an error How can I do ??? Thanks a lot, Frederic ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] get objects DTML Document having Property order...
"QUIN Frédéric" wrote: Hello, I want to do : dtml-in "objectValues('DTML Document')" sort=order ... /dtml-in I have some DTML Documents which don't have the property "order", and I don't want to consider those documents in my loop. But if I put the "sort=order" option, Zope raises an error How can I do ??? Here's a convoluted hack (untested). I wonder if anyone can come up with a better way. dtml-let values="objectValues('DTML Document')" filtered="[]" dtml-in values dtml-if order dtml-call "filtered.append(_['sequence-item'])" /dtml-if /dtml-in dtml-in filtered sort=order ... your code here ... /dtml-in /dtml-let ... but the version of Zope in the CVS repository already has a change that makes it so the sorting code will consider fields that don't exist to have the value "None". This makes it so you can sort the natural way. Shane ___ Zope maillist - [EMAIL PROTECTED] 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 )