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

Uploaded Source

Built Distribution

z3c.jbot-0.1.1-py2.4.egg (11.1 kB view details)

Uploaded Egg

File details

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

File metadata

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

File hashes

Hashes for z3c.jbot-0.1.1.tar.gz
Algorithm Hash digest
SHA256 727b349cf94a5a26861f21301614ab5fa15792600a56ec6153db6bd424e7faab
MD5 5baa49b3f0e8a245f502156a876bf7c4
BLAKE2b-256 ddcff386a30e1bc1f021eb2fb1f774824187761198d63100ee9449ace1226524

See more details on using hashes here.

File details

Details for the file z3c.jbot-0.1.1-py2.4.egg.

File metadata

  • Download URL: z3c.jbot-0.1.1-py2.4.egg
  • Upload date:
  • Size: 11.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for z3c.jbot-0.1.1-py2.4.egg
Algorithm Hash digest
SHA256 93723033ebd77d18198e560324d2f026a4c9423f5226dbc4e1e7243fdc403d6d
MD5 28efa3dc2408f7e44804e05b55d7c736
BLAKE2b-256 e681ffc69e78e2215902ef36ead27580c4817a271de3a166625f5e1334b8d2e1

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