[Zope] Zope hanging on a dereference???

Tres Seaver tseaver@palladion.com
Wed, 23 Feb 2000 15:35:04 -0600


Michiel Toneman <toneman@phil.uu.nl> asks:
>
> This came up on the list some time ago, but this
> solution gets Zope (2.1.4) in an infinite loop.
> 
> --------------------------------------------------------------
> <dtml-in "objectIds()">
>   <dtml-let refID=sequence-item> <!-- alias sequence-item -->
>    <dtml-with "_[ refID ]">      <!-- "dereference" refID -->
>     <dtml-var id>                <!-- use the object      -->
>    </dtml-with>
>   </dtml-let>
> </dtml-in>
> --------------------------------------------------------------
> 
> Any ideas?

Um, why go there?  I mean, I don't know what is bothering Zope, but there are
easier ways to get what you want::

  <!-- skip the derer altogether, use properties directly -->
  <dtml-in "objectValues()">
   <a href="&dtml-absolute_url;"> <dtml-var id> </a>
  </dtml-in>

or, if you really just want the ids::

  <dtml-in "objectIds()">
   <dtml-var sequence-item>
  </dtml-var>


-- 
=========================================================
Tres Seaver         tseaver@palladion.com    713-523-6582
Palladion Software  http://www.palladion.com