[Zope] Acquisition problem.

Dieter Maurer dieter at handshake.de
Sun Feb 29 13:33:52 EST 2004

Star War wrote at 2004-2-28 12:29 -0800:
>The previous of designer of our website left a code
>like this
>The index_html as follows
><dtml-var standard_html_header>
>   <dtml-call "REQUEST.set('PageTemplates',
>   PageTemplates.<dtml-var PageTemplates>
> ...
>What it does means
>'templates.common.content.gfx.gfx_Reports'? Folders
>'common', 'content', 'gfx', and 'gfx_Reports' are in
>the same level in templates. Does it mean a path for

Almost surely.

>where can I that in the zope book?

Read about acquisition...

You may also look in the "Name lookup" section of


>But acutally this expression just return a folder
>instance(<dtml-var PageTemplates>. If you change it to
><dtml-call "REQUEST.set('PageTemplates',
>you get the same folder instance, but index_html
>return error 'Keyerror: page_menu'.
>How to explain that?

You never get a "Folder" but a so called context (or Acquisition) wrapper.
This wrapper contains the object but also the way you accessed the object.
The wrappers returned for "templates.gfx_reports" and
"templates.content.gfx_reports" differ considerable also they
both are for the main object "Folder gfx_reports".

Read more about this in the above mentioned resources...


More information about the Zope mailing list