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

Thomas B. Passin tpassin@mitretek.org
Fri, 1 Jun 2001 11:42:12 -0400


Where are you setting this_id?  Are you doing it like Tim illustrated?  I
don't see it in your code fragment.

Tom P

[Garry Steedman]
re this earlier post which i'm still having problems with, can anyone
enlighten me as to what could be causing this excessive recursion
error (and how to avoid it)?

cheers,

G


------- Forwarded message follows -------
From:           Garry Steedman <gs@styrax.com>
To:             tim@freepm.org
Subject:        Re: [Zope] Equality test: if sequence-item = document id
Copies to:      zope@zope.org, "Max Møller Rasmussen" <maxm@normik.dk>
Send reply to:  gs@styrax.com
Date sent:      Fri, 1 Jun 2001 14:52:32 +0000

Hi Tim,

i don't understand why, but it doesn't work for me!

what i have is this:

a nav_stuff method:

<DIV CLASS=navigation VALIGN="top">
<dtml-in "PARENTS[0].objectValues('DTML Document')"
sort=menu_sort_order>
<dtml-if "hasProperty('menu_sort_order')">
<dtml-if "_['sequence-item']==this_id">
&nbsp;&nbsp;<a href="&dtml-absolute_url;">[<dtml-var title>]</a>
<dtml-else>
</dtml-if>
&nbsp;&nbsp;<a href="&dtml-absolute_url;"><dtml-var title></a>
<dtml-else>
</dtml-if>
</dtml-in>
</DIV>

which is called from the standard header.

the standard header and the nav_stuff method are in the same folder.
if i have a document in a subfolder which calls the standard header,
which in turn calls the code above, i get an excessive recursion
error.

any suggestions would be much appreciated!

cheers,

G

On 1 Jun 2001, at 7:30, Tim Cook wrote:

From:           Tim Cook <twcook@iswt.com>
Send reply to:  tim@freepm.org
Organization:   Free Practice Management, Inc.
To:             gs@styrax.com
Copies to:      zope@zope.org,
        "Max Møller Rasmussen"
 <maxm@normik.dk>
Subject:        Re: [Zope] Equality test: if sequence-item =
document
id Date sent:      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
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> 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 )


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

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

_______________________________________________
Zope maillist  -  Zope@zope.org
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 )