[Zope-CMF] Acquiring standard_html_header & _footer
Howard Hansen
howardh@halfmagic.com
Fri, 7 Jun 2002 09:19:42 -0700
Thanks for the response!
I'm not sure what you mean by removing the standard_html_header of
portal_skins on the filesystem. I've deleted the header and footer from
.../portal_skins/generic, which displays the default CMF header and footer,
as before.
Re
<dtml-var "PARENTS[-1].sites.wa.standard_html_header()">
It does work, it just uses the actual location of standard_html_header as
its context. Since it's shared, it physically lives at /sites, but it
relies on objects that exist in the /sites/wa folder, which it can't find
from the higher-level context.
Does that make sense? I think I know what happened, but I don't know why or
how to change the behavior!
> Why not simply remove the standard_html_header of portal_skins
> directly on the filesystem ?
>
> Anyway I'm surprised this doesn't work, it should:
> <dtml-var "PARENTS[-1].sites.wa.standard_html_header()">
>
>
> Florent
>
> Howard Hansen <zope@halfmagic.com> wrote:
> > 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?
> --
> Florent Guillaume, Nuxeo (Paris, France)
> +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com
Howard Hansen
http://howardsmusings.com