[Zope] Equality test: if sequence-item = document id
Max Møller Rasmussen
maxm@normik.dk
Fri, 1 Jun 2001 14:32:40 +0200
> From: Tim Cook [mailto:twcook@iswt.com]
> This works. It has something to do with resolving the string
> representation of the object id.
> I often use something that I've found that works. I don't
> necessarily care why. Maybe someday? <vbg>
>
> <dtml-let this_id=id>
> <dtml-in "PARENTS[0].objectIds('DTML Document')">
> <dtml-if expr="_['sequence-item']==this_id">
> <li><dtml-var sequence-item></li>
> <dtml-else></dtml-if>
> </dtml-in>
> </dtml-let>
I would say that it is because you take the ID's from 2 different namspaces.
As soon as you go into a dtml-in another namespace gets popped onto the
stack. When you set this_id outside th dtml-in you set it in the documents
namespace.
regards Max M