[Zope] Basic Zope Concepts...
Evan Simpson
evan@digicool.com
Fri, 16 Mar 2001 19:21:09 -0500
From: "Edmund Goppelt" <goppelt@goppelt.net>
> I'm not sure I fully understand what Python Script's container and
> context refer to.
Make two folders in your Zope root, called "F1" and "F2". Put a Script in
"F1", call it "S".
Now, S will always have container==F1, but its context depends on the path
you take to get to it. Thanks to acquisition, you can follow a path like
"/F1/F2/S", which will give you S with context==F2.
Both context and container can be used to get at REQUEST, since you can
acquire REQUEST from any Zope object. The namespace "_", on the other hand,
is a special feature of DTML. The only way you'll have to deal with the
namespace stack in a Script is if you deliberately pass it in as a
parameter, or you take a Script that has been set up with a namespace
binding, and call it like this: <dtml-var name="S">.
Cheers,
Evan @ digicool