Personal tools
You are here: Home Products Plone Roadmap #216: Template overrides
Document Actions

#216: Template overrides

Contents
  1. Definitions
  2. Motivation
  3. Proposal
  4. Implementation
  5. Risks
  6. Progress log
  7. Participants
by Malthe Borch last modified December 17, 2007 - 12:15
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

Framework team vote

Posted by Andreas Zeidler at December 14, 2007 - 15:56
+1 (see http://lists.plone.org/pipermail/framework-team/2007-December/001544.html)

Framework team vote

Posted by Raphael Ritz at December 17, 2007 - 13:16
+1

Framework team vote

Posted by Tom Lazar at December 20, 2007 - 13:11
+1 under provision of using z3c.jbot as inspiration and putting the actual code into plone core, as discussed on the list. great plip, btw!

Framework vote

Posted by Martijn Pieters at December 21, 2007 - 17:13
+1

Framework team vote

Posted by Danny Bloemendaal at December 22, 2007 - 16:02
+1

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by