[Zope] Equality test: if sequence-item = document id

Tim Cook tim@freepm.org
Fri, 01 Jun 2001 07:30:22 -0500


Garry Steedman wrote:
> 
> max,
> 
> nope!
> 

> > > From: Garry Steedman [mailto:gs@styrax.com]
> >
> > > <dtml-in "PARENTS[0].objectIds('DTML Document')">
> > > <dtml-if expr="_['sequence-item']=='this().id'">
> > > <li><dtml-var sequence-item>
> > > <dtml-else>
> > > </dtml-if>
> > > </dtml-in>
> >
> > > which of course doesn't work, but i'm not sure why or what i need
> > > instead!
> >

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>


-- 
Tim Cook, President - FreePM,Inc. 
http://www.FreePM.com Office: (731) 884-4126
ONLINE DEMO: http://www.freepm.org:8080/FreePM