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

Uploaded Source

Built Distribution

z3c.jbot-0.1-py2.4.egg (8.7 kB view details)

Uploaded Egg

File details

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

File metadata

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

File hashes

Hashes for z3c.jbot-0.1.tar.gz
Algorithm Hash digest
SHA256 4b7523d91ebc6ecbe643bba5a7be41e33eeffb7892cbea61ec9db3ecadd04363
MD5 c2a82a279ae50db7420a8c4d551ef4f1
BLAKE2b-256 6a0d65f08b4f601cb2c487ac249eec1c9f962b52a4a64dff29cac9fbad18c167

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for z3c.jbot-0.1-py2.4.egg
Algorithm Hash digest
SHA256 0b1e94a6569f7fe48995386a7ac3a89f946a6a4ae56037a97da31fea911b9f4c
MD5 2748410389d37a344a2b5d7dddbf39e4
BLAKE2b-256 952b1ae1ecd12edb5e834855bc155bae2dd1ceda1bac5b111be0b5720622a695

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