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 request-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

In python:

>>> from z3c.jbot.utility import getManager
>>> getManager().registerDirectory(directory)

Using ZCML:

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

<browser:templateOverrides

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

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.tar.gz (8.3 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for z3c.jbot-0.2.tar.gz
Algorithm Hash digest
SHA256 e8290de2a7b4a6fd605675f0ed6fc097ff7a197fa94f4099a5827b1e56ac2768
MD5 2c745219a5780b9eeddd2249bf2dab87
BLAKE2b-256 58bf4d27b2b5fc8063f553870ec470aeb26f57f2065b8534df5da2d215ca1098

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