[Zope] A Method To My Madness?
Geir Bækholt
Geir Bækholt
Sat, 8 Sep 2001 20:14:05 +0200
Hello Oleg,
Saturday, September 08, 2001, 19:33:01, you wrote:
[snip]
OB> Nothing. You do it all right, but you forgot that Documents and Methods
OB> have different namespace rules. A Method does not have its own namespace,
OB> so objectValues is applied to its (the Method's) container.
OB> But a Document has its own namespace, so objectValues is applied to the
OB> Document itself! And there is no subobjects to list by objectValues, so you
OB> got nothing.
OB> Inside DTML Document you would write
OB> <dtml-in expr="PARENTS[-1].objectValues('DTML Document')">
OB> thus listing objects in Document's parent (e.i. its container).
..
except that PARENTS[-1] is the site root.. You're counting the wrong
way.. PARENTS[1] (or is it PARENTS[0]?) would give you the container
:-)
--
Geir Bækholt web-developer/zopatista
geirh@funcom.com funcom oslo | webdev-team
<!-- PGPid : 0x90B47B20 -->