Drop-in template overrides.
Project description
Overview
The z3c.jbot (or “Just a bunch of templates”) package allows drop-in page template overrides. It works on Zope 2 and Zope 3. The Chameleon rendering engine is supported [1].
Any template that is defined as a class-attribute can be overriden using jbot, e.g. those used in views, viewlets and portlets. The template overrides may be registered for any request layer or only a specific layer.
To override a particular template, first determine its canonical filename. It’s defined as the path relative to the package within which the template is located; directory separators are replaced with dots.
Example:
Suppose you want to override: /plone/app/layout/viewlets/logo.pt
You would use the filename: plone.app.layout.viewlets.logo.pt
Simply drop the file in a directory and register that directory for use with jbot using a ZCML-directive:
<include package="z3c.jbot" file="meta.zcml" /> <browser:templateOverrides directory="<path>" layer="<layer>" />
Use of this package adds a small (2-3 ms per request on Plone) to the total application response time.
Changes
0.4 (2009-10-15)
Added Chameleon-support.
Reimplemented override logic; the total usage cost is now reduced to an insignificant amount. Meanwhile, only templates that are defined as class-attributes (e.g. on views, viewlets and portlets) can be overriden.
0.3 (2009-09-26)
Improved test coverage.
Refactored code, improving performance.
Fixed issue with multiple layers.
0.2 (2008-07-14)
Added layer support.
0.1 (2007-11-27)
Initial public release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file z3c.jbot-0.4.tar.gz
.
File metadata
- Download URL: z3c.jbot-0.4.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
385fe6ff3648b76525c0cfa5efcd63524707e37d9a83aff3ffded9875b04e917
|
|
MD5 |
78f3dd03bcaaba649b0096db89ee860f
|
|
BLAKE2b-256 |
bab6f6f4c8b2031caaea9aeabd2443cfffa131c7e6f1976e93098381727811b3
|