[Zope] Using aquisition inside a dtml method of a product ?

Dieter Maurer dieter@handshake.de
Thu, 7 Dec 2000 22:31:26 +0100 (CET)


Hi Andreas,

Andreas Jung writes:
 > Inside a product my index_html is set to 
 >    
 >    "index_html=HTMLFile('index_html',globals())"
 > 
 > The index_html.dtml calls <dtml-var standard_html_header>. This DTML method is
 > available in the top-level hierarchy. However When I call index_html Zope
 > complains with a KeyError/standard_html_header.  When I remove the "<dtml-var
 > standard_html_header>" call everything works fine.
 > 
 > Any idea why aquisition won't work in this case ?
HTMLFile does not inherit from "Acquisition.Implicit".
Therefore, HTMLFile objects do not have an acquisition context.

On the other hand, they should not need one, provided
they get a correct "client" parameter (i.e. first parameter).
Probably, that is your real problem: "index_html" is
  probably called with "client=None".


Dieter