[Zope-CMF] Re: [dev] five_template slots
Florent Guillaume
fg at nuxeo.com
Fri Mar 24 09:58:27 EST 2006
IIRC the idea was to have a template usable from standard Zope 3 views that
expected the standard Zope 3 slots, and css_slot was one of those.
But I'll let Lennart answer, I've never really touched this stuff.
Florent
yuppie wrote:
> Hi!
>
>
> A while ago the five_template for the trunk / CMF 2.0 was replaced by
> the one from CMFonFive.
>
> I still have some difficulties understanding the rationale behind that
> change. I never got an answer to this mail:
>
> http://mail.zope.org/pipermail/zope-cmf/2006-January/023746.html
>
>
> AFAICS there are two use cases for the five_template:
>
>
> 1.) Provide generic slots used in Five and Zope 3
>
> The five_template shipped with Five provides two slots: 'style_slot' and
> 'body'. The old CMF five_template did provide the same two slots. The
> new five_template maps 'style_slot' to a non-existent 'css_slot'.
>
>
> 2.) Provide cmf specific slots in @@standard_macros/page
>
> The new five_template provides 'base' and 'header', mapping them to the
> corresponding slots in main_template. 'body' is mapped to 'main', so all
> slots in main_template can be filled via the five_template. I'm not sure
> if we really should support that use case. At least it is less important
> than the first use case.
>
>
> Issues:
> -------
>
> - mapping 'style_slot' to 'css_slot' is an obvious bug, that change
> should be reverted
>
> - the 'header' slot behaves different than in main_template:
> main_template provides default content for 'header', the five_template
> 'header' is empty by default. I'd like to keep that in sync, but maybe
> we should remove the default content from main_template. Most skin
> templates override the 'header' slot anyway.
>
> - the Five 'body' slot doesn't map very well to the CMF 'main' slot:
> 'header' *and* 'main' would match better.
>
>
> Proposal:
> ---------
>
> 1.) Add a new 'body' slot in main_template that wraps around the
> 'header' and the 'main' slot. You can either use 'body' *or* 'header'
> and 'main'.
>
> 2.) Remove the default content in main_template's 'header' slot.
>
> 3.) Replace five_template by something like this:
>
> <metal:macro metal:define-macro="page">
> <html metal:use-macro="context/main_template/macros/master">
> <head>
> <metal:slot metal:fill-slot="base">
> <metal:slot metal:define-slot="base" />
> </metal:slot>
> <metal:slot metal:fill-slot="style_slot">
> <metal:slot metal:define-slot="style_slot" />
> </metal:slot>
> </head>
> <body>
> <metal:slot metal:fill-slot="body">
> <metal:slot metal:define-slot="body">
> <metal:slot metal:define-slot="header" />
> <metal:slot metal:define-slot="main" />
> </metal:slot>
> </metal:slot>
> </body>
> </html>
> </metal:macro>
>
> 4.) Change the browser view templates to use 'main' instead of 'body'
> (that no longer maps to 'main').
>
>
> Any feedback is welcome. If there are no objections I'd like to make the
> proposed changes on Saturday, before the 2.0-beta2 release.
>
>
> Cheers,
>
> Yuppie
>
> _______________________________________________
> Zope-CMF maillist - Zope-CMF-lEa0QfImRKZ5o+NzvwT5Tw at public.gmane.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and feature requests
>
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo.com fg at nuxeo.com
More information about the Zope-CMF
mailing list