Using z3c.jbot

Chrissy Wainwright

What is z3c.jbot?

A product that makes for easy overriding of templates.

Templates can come from Plone or an installed add-on.

Getting Started with z3c.jbot

This code needs to be in your theme's configure.zcml:

<browser:jbot
    directory="template_overrides"
    layer=".interfaces.ICustomTheme"
    />

Creating Overrides

To override Plone's searchbox template, you first need to find it.

Viewlets are in plone/app/layout/viewlets.

Make sure you are grabbing this from the version of plone.app.layout your Plone site is using.

Creating Overrides

Copy searchbox.pt into template-overrides.

Rename it using the path to the original file:

plone.app.layout.viewlets.searchbox.pt

Add a comment at the top of the file to note what version the template was copied from (will help when upgrading Plone).

Restart the Plone Instance

Each time a new override is added, the site needs to be restarted.

After the restart, new changes are visible when refreshing the site.

Customizing Templates TTW

Use collective.jbot - it provides an interface in Site Setup for customizing templates.

SpaceForward
Right, Down, Page DownNext slide
Left, Up, Page UpPrevious slide
POpen presenter console
HToggle this help