Ticket #9564 (closed PLIP: wontfix)
Template overrides
Reported by: | dukebody | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | Future |
Component: | General | Version: | |
Keywords: | Cc: |
Description
http://plone.org/products/plone/roadmap/216
Include the z3c.jbot package in the core distribution to have a standardized way of customizing file-system templates. The package would probably be rebranded, e.g. plone dot something.
Proposed by
Malthe Borch
Proposal type
Architecture
Repository branch
z3c.jbot
State
being-discussed
Definitions
JBOT - just a bunch of templates.
Motivation
The entry bar for customizing the default skin of Plone is too high as it is; z3c.jbot makes overriding templates easy by letting developers register one or more 'overrides' directories and simply dump customized templates in there. Only requirement is that a simple naming convention is followed:
If the template resides in, say, browser/templates/logo.pt inside the plone.app.layout package, the canonical override key would be 'plone.app.layout.browser.templates.logo.pt". A registry of the available override templates for each directory is frozen upon startup. Changes to the template file will be picked up at run-time (in development mode), but new files won't be picked up after startup.
The jbot-approach is an easy way to get started and it scales in the sense that if you later need to add custom logic or other customization of the registration, it's as simple as moving the file and doing a proper zcml registration.
It's really an alternative to named templates and I think it's preferable to use canonical names rather than conventional names.
Proposal
Integrate z3c.jbot (probably rebranded) into the core distribution. Add (more) documentation.
Implementation
Currently it's a monkey on zope.pagetemplate. The package hooks into the render-method of the template querying jbot's template manager to see if it should use a different file. There's a negligible overhead.
Risks
This does introduce two ways of customizing Plone. But it's a way that's very similar to that of previous Plones.
Progress log
Package is done; more documentation is needed.
Participants
malthe
PLEASE READ THIS AND RE-OPEN VALID PLIPS!
As we launch the new PLIP process we'd like to see which PLIPs:
If this PLIP should still be considered for future releases of Plone please do re-open this ticket and assign an appropriate milestone. If it should be considered for the next release of Plone, use the 4.2 milestone. Also be sure to update the PLIP description, requester, owner, etc. and include a comment detailing recent progress and new plans. We will use all these details in the new continuous PLIP process.