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.

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.manager import getGlobalTemplateManager
>>> getGlobalTemplateManager().registerDirectory(directory)

In ZCML:

<include package=”z3c.jbot” file=”meta.zcml” /> <browser:templateOverrides directory=”<directory>” />

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for z3c.jbot-0.1.4.tar.gz
Algorithm Hash digest
SHA256 6b36565d6e3a294bad574b8179ed4eb4ed9dee444c4352fcbbe960ca04dcd8ac
MD5 9a843444936c222c572a34baf251dec2
BLAKE2b-256 27dbbdf81c173ead887f103be96880aa01c3a71e3b235fb7fd76fd653b319da9

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