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

Garry Steedman gs@styrax.com
Fri, 1 Jun 2001 13:26:49 +0000


hi,

i should explain: the code below is in a method nav_stuff which is 
called from standard_header which in turn is called from an arbitrary 
document. when i use the getId() method, zope throws an "excessive 
recursion" error.

any suggestions?

cheers,

G

On 1 Jun 2001, at 13:17, E. Seifert wrote:

From:           	"E. Seifert" <e.seifert@gmx.net>
To:             	<gs@styrax.com>
Subject:        	Re: [Zope] Equality test: if sequence-item = document id
Date sent:      	Fri, 1 Jun 2001 13:17:38 +0200

> Hi Garry,
> 
> you wrote:
> > i have the following code which works fine:
> > 
> > <dtml-in "PARENTS[0].objectIds('DTML Document')">
> > <dtml-if expr="_['sequence-item']=='index_html'">
> > <li><dtml-var sequence-item>
> > <dtml-else>
> > </dtml-if>
> > </dtml-in>
> > 
> > but i would like to replace 'index_html' with the document's id
> > variable, something like this:
> > 
> > <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!
> 
> Did you try the getId() method?
> 
> Regards
> Eric


+-------------------------------------------+
  Garry Steedman      mailto:gs@styrax.com  
  Styrax Associates  http://www.styrax.com/ 

  "The Good Man has no shape."            
+-------------------------------------------+