[Zope-CMF] [dev] five_template slots
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: 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@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
Re: [Zope-CMF] [dev] five_template slots
On 3/23/06, yuppie <[EMAIL PROTECTED]> wrote: > - mapping 'style_slot' to 'css_slot' is an obvious bug, that change > should be reverted Why is it a bug? That's not obvious to me at all. Both slots are for putting style sheets in... > - the 'header' slot behaves different than in main_template: > main_template provides default content for 'header', the five_template > 'header' is empty by default. OK, syncing that someway seems reasonable. > 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'. For 2.0 I'm ok with this, but note that this will mean that everybody must add this slot to their templates when they upgrade to 2.0, or all Five products will break. > 4.) Change the browser view templates to use 'main' instead of 'body' > (that no longer maps to 'main'). Well, they *do* use body so we can't change that. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests