[Zope] Re[2]: [Zope] comparing variables from different name spaces?

Ethan Fremen mindlace@majordomo.net
Tue, 28 Sep 1999 18:14:44 +0100


Ainis wrote:

> So I tried:
> <dtml-if "PARENTS[-3].id">
> but i get an error if it does not exist. So how do i check if the
> variable exists?

From Michel Pelletier:

<dtml-with test>
  <dtml-if "dir2 in PARENTS">
    dir2 is one of your parents
  </dtml-if>
</dtml-with>

This will work no matter where dir2 is in the acquisition hierarchy (as
long as it's within test).

-- 
~mindlace