[Zope] Understanding acquisition in CMF/Plone

Phil Glaser StillSmallVoice@DirectvInternet.com
Mon, 5 Aug 2002 21:39:04 -0400


Hi,

I just got done reading about traversal in _The Zope Book_ (pp. 138-140) and
am at a loss to explain how this is working in Plone. I have a Plone Site
named "plonetest" and when I go to the user preferences page it brings up
the following url:

/proto/testplone/personalize_form

So Zope is calling the personalize_form method in the context of the
testplone object. But I can't figure out how personalize_form is being
acquired. It would be simple if personalize_form were contained in
testplone, but it's not: there are three versions of personalize_form lower
down in the hierarchy:

testplone/portal_skins/generic/personalize_form
testplone/portal_skins/plone_forms/personalize_form
testplone/portal_skins/zpt_generic/personalize_form

>From what I read, I thought that the acquisition mechanism only works from
lower to higher in the container hierarchy -- that if personalize_form is
not contained in the testplone object, it just won't be found. But somehow,
Zope is locating one of these methods and then running against the testplone
object.  What I read lead me to believe that in order to find an object more
than one level below the highest container, you would have to include the
path to the lower container (e.g., portal_skins/generic), or whatever, in
the url. As a practical matter, I could figure out which form it's calling
if I could find meaningful differences between the forms, by deduction, but
that still would not answer my question: How did Zope know which
personalize_form to call?

Secondarily, for Plone, specifically, the member preferences page lets you
decide which skin to use, but some  of the names listed (e.g., "plone
default", "Plone XP") do not appear as distinct folders in the portal_skins
container. Am I missing something?


Thanks!

Philip Glaser
Principal and Software Architect
Sustainable Software Solutions, LLC
StillSmallVoice@DirectvInternet.com
www.sustainsoft.com
973-951-9522