Skip to main content

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 by giving page templates a canonical filename which you can use to provide a replacement in your own package. Simply register a template overrides directory and give your new template the canonical filename.

Overrides may be registered for a specific layer or any layer.

Canonical filename

The canonical filename is defined as the path relative to the package within which the template is located with directory separators 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

Registering a on overrides directory

A Zope component configuration directive is available to configure overrides.

<include package=”z3c.jbot” file=”meta.zcml” />

<browser:templateOverrides

directory=”<directory>” layer=”<layer>” />

Performance considerations

The use of jbot adds to the general page load time. On a site with many templates this may be as much as 20 ms per request (a 7% increase on my machine).

Author

Malthe Borch <mborch@gmail.com>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

z3c.jbot-0.2.4.tar.gz (9.3 kB view details)

Uploaded Source

File details

Details for the file z3c.jbot-0.2.4.tar.gz.

File metadata

  • Download URL: z3c.jbot-0.2.4.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for z3c.jbot-0.2.4.tar.gz
Algorithm Hash digest
SHA256 b673f8d3ab1a804fcd07857005d5b6a20016418e9ec5ab08e46ece4a6e4c4f9b
MD5 eacdc1d70a50c054eb379a0144a22523
BLAKE2b-256 7698a740f10465c2dd5b567af4d9862586537ea1a195e7d0e230a8c78718e5ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page