Drop-in template overrides.
The z3c.jbot (or “Just a bunch of templates”) package allows easy customization of existing templates and images. It works on Zope 2 and Zope 3.
The Chameleon rendering engine is supported .
Use of this package adds a small (2-3 ms per request on Plone) to the total application response time.
|||To enable Chameleon on Zope 2, use the five.pt package (CMF-apps like Plone should use cmf.pt which adds full support).|
To override a particular file, first determine its canonical filename. It’s defined as the path relative to the package within which the file is located; directory separators are replaced with dots.
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:jbot directory="<path>" layer="<layer>" />
Templates in views, viewlets and portlets
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.
Any skin-object (e.g. images, templates) on the file system (directory views) can be overridden.
If plone.resource is installed, it’s possible to use jbot to override filesystem resources.
- Added support for static resource registered using the “static” directive of plone.resource. [malthe]
- Breaking: Remove long deprecated backward compatibility imports of getSite and setHooks. [jensens]
- Fix #8: Broken on Windows (non case-sensitive filesystem). [jensens]
- Fix tests to run on windows. [jensens]
- Add Github Actions testrunners for ubuntu, windows. [jensens]
- Run tests with Zope 4.5. [jensens]
- Breaking: Add and test/support for Python 3.8. Drop support for Python 3.5. [jensens]
- Added support for Python 3.5, 3.6, 3.7; dropped support for 2.6. [ale-rt, pbauer]
- Fix: Be sure ignored templates will reread from disk. [ale-rt]
- Standardize namespace __init__
- Fix issue where zope.browserpage.viewpagetemplatefile.ViewPageTemplateFile was not using jbot overrides. [davisagli]
Fixed an issue where multiple registrations against the same layer would cause only one registration (decided randomly) to have effect.
The lookup code now uses the specification resolution order to query for override registrations in order of specialization. [malthe]
- Fixed issue where templates being patched by five.pt would not get properly jbotted.
- Use five.pt if available. [malthe]
- Fixed an issue where tests would fail on Zope 2.10. [malthe]
- Fixed compatibility with Plone 3.x. [malthe]
- Downgrade log messages to debug level. In normal operation they don’t contain any valuable information. [hannosch]
- Prefer zope.site over zope.app.component if it is available. [hannosch]
- Fix bungled release [optilude]
- Zope 2.12 compatibility. [malthe]
- Added support for automatic configuration. [malthe]
- Fixed layer specialization ordering. [malthe]
- ZCML-directive is now called jbot. [malthe]
- Fixed issue where an exception would be raised if a view was not an acquirer, while the context was. [gweis]
- Acquisition-wrap template instance, if applicable. This fixes an issue on Zope 2.10 where legacy code would break.
- Added support for CMF skin objects.
- 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.
- Improved test coverage.
- Refactored code, improving performance.
- Fixed issue with multiple layers.
- Added layer support.
- Initial public release.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size z3c.jbot-1.1.0.tar.gz (17.9 kB)||File type Source||Python version None||Upload date||Hashes View|