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', templates.common.content.gfx.gfx_Reports)"> 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 acquisition?
Almost surely.
where can I that in the zope book?
Read about acquisition... You may also look in the "Name lookup" section of <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>
But acutally this expression just return a folder instance(<dtml-var PageTemplates>. If you change it to
<dtml-call "REQUEST.set('PageTemplates', templates['gfx_reports'])">
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... -- Dieter