[Zope] Newbie Acquisition Question
Nils Kassube
lists@kassube.de
Fri, 1 Jun 2001 21:14:43 +0200
Guten Abend.
* Daniel Fairs <daniel.fairs@spiderplant.net> [2001-05-25 17:30]:
> Zope to use the correct namespace? My understanding was that all name
> resolution started at the place specified from the URL, and then worked back
> 'up' the tree... My experience here shows this is true, but the search URL
Nope. Acquistion means that the search first tries all the containers
up to the root folder and _then_, if it didn't find the wanted
object, evaluates the context. Containment before context. This is
a very important Zope concept.
I assume your index_html is a DTML document. This means that it has
its own namespace. Your contentPanel isn't part of its namespace,
so Zope tries to look it up in your index_html's container which
happens to be the root folder. The solution is to use a DTML
method. I know this was mentioned in an answer to your question,
but without a full explanation of the reason. This is the reason:
A method doesn't have his (or her) own namespace. It "lives" in
the namespace of the object the method is called on.
Any questions? :-)
Cheers,
Nils