[Zope] Acquisition problem.

Star War starwar992001 at yahoo.com
Sat Feb 28 19:54:27 EST 2004


I am just wondering where such an expression is
mentioned in the zope book. and PageTemplates is just
a folder instance. How does it store such path
information? REQUEST.set() is a python call, is this
expression,
'templates.common.content.gfx.gfx_Reports', a special
function?

If I have a string storing
'templates.common.content.gfx.gfx_Reports', how to
write the REQUEST.set() statement to get the same
result?

Thanks


--- Declan Shanaghy <declanshanaghy at yahoo.com> wrote:
> You are right in your assumption, it sets up all
> those folders in an acquisition heirarchy.
> Basically whenever PageTemplates is referenced, it
> will look in all those folders.
> 
> The page_menu is under the content folder, so if you
> set the PageTemplates parameter to
> templates['gfx_reports'] it cannot find page_menu so
> it raises a KeyError.
> 
> 
> 
> --- Star War <starwar992001 at yahoo.com> wrote:
> > hi,
> > 
> > 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>
> >    <dtml-with PageTemplates>
> >       <dtml-var page_menu>
> >       <dtml-var page_content>
> >       <dtml-var page_credits>
> >    </dtml-with>
> > <dtml-var standard_html_footer>
> > 
> > and the folder templates as follows
> > 
> > templates (folder)
> >   |
> >   + common (folder)
> >   |  |
> >   |  + page_credits (DTML method)
> >   |
> >   + content (folder)
> >   |  |
> >   |  + page_menu (DTML method)
> >   |
> >   + gfx (folder)
> >   |  |
> >   |  + page_content(DTML method)
> >   |
> >   + gfx_Reports (folder)
> >      |
> >      + showFull (DTML method)
> > 
> > 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? where can I that in the zope book?
> > 
> > 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?
> > 
> > Thanks
> > 
> > __________________________________
> > Do you Yahoo!?
> > Get better spam protection with Yahoo! Mail.
> > http://antispam.yahoo.com/tools
> > 
> > _______________________________________________
> > Zope maillist  -  Zope at zope.org
> > http://mail.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists - 
> > 
> http://mail.zope.org/mailman/listinfo/zope-announce
> >  http://mail.zope.org/mailman/listinfo/zope-dev )
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com


__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools



More information about the Zope mailing list