[Zope-CMF] Acquiring standard_html_header & _footer

Howard Hansen zope@halfmagic.com
Thu, 6 Jun 2002 09:24:22 -0700


I've got nearly-identical sites for several states, structured something
like this:

/sites/wa
      /or
      /nj

Much of the sites' framework lives inside the /sites directory, including
standard_html_header, footer, etc.  Each state folder defines the unique
characteristics for that state (highlight colors, site name, etc.).

I've inserted a CMF instance as a members-only area as /sites/wa/members.

When I head over to the members site, I get the CMF frame, not the state
site frame.  It won't let me delete standard_html_header from
.../portal_skins/generic, but it does override the standard when I create a
.../portal_skins/custom/standard_html_header object.

My blundering Google searches haven't unearthed a solution, and I've tried
explicitly telling it what to use:

<dtml-var "PARENTS[0].standard_html_header()">
<dtml-var "PARENTS[1].standard_html_header()">
<dtml-var "PARENTS[-1].sites.wa.standard_html_header()">

Each of these seems to get hold of a standard_html_header object and
attempts to excecute it.  Unfortunately, it's got a context problem.  It
seems to be using the location of the standard_html_header method as its
context, not its absolute context.  This breaks things, since it's asking
for parameters that live only inside the state folder.

So, (1) is there an easy way to delete references to standard_html_header
and let acquisition fix this for me, or (B) how can I explicitly call the
standard_html_header, but in the proper context?

Thanks for the help!

Howard Hansen
http://howardsmusings.com