[Zope] Re[2]: [Zope] comparing variables from different name spaces?
Ethan Fremen
mindlace@majordomo.net
Wed, 29 Sep 1999 11:50:03 +0100
Ainis wrote:
> I have partially solved my problem. I'm comparing a list of /test/
> subfolders with "PARENTS[-3].id" and it works just fine but thing
> blows up when I try to execute script from /test/ and it's easy to
> understand why because in /test/ "PARENTS[-3].id" does not exist.
> My problem now is only to check if "PARENTS[-3].id" exists but how can
> I do that? <dtml-if "PARENTS[-3].id"> for some strange reason does not
> work :(
Try: <dtml-if PARENTS[-3]> (you don't care about the ID, just whether
it's deep enough, _then_ you want to check for ID)
If that doesn't work:
<dtml-if "test in PARENTS">
check for dir2
</dtml-if>
Which will work in subfolders of test (even if they're test) but not in
/test. (I think- if you run this test in a document as opposed to a
method, it might not be true.)
--
~mindlace