Bobtemplates barceloneta theme template-override feature

When creating a barceloneta theme project using bobtemplates it also creates the template-override folder.
I am following - but I know these tutorials are a bit outdated.
Anyhow, in the tutorial above, you just add the new template to override the regular one with the dot notation: or
My question here is is this enough? Since it did not work for me (maybe I got something wrong). But doing somemore digging I had to add a configuration in the browser/configure.zcml file:


Is this a good way to do it or am I missing something?

It used to be that you had to define the template overrides directory in your main configure.zcml

I have this in a Plone 5.0 site, maybe it has changed? I think I remember z3c.jbot is included in 5.2?

       Load template overrides using z3c.jbot
  <include package="z3c.jbot" file="meta.zcml" />
  <browser:jbot directory="browser/templates/overrides"

Edit/add: and in there should be a marker for your browserinterface.

in 5.2 it is IDefaultBrowserLayer (was IDefaultPloneLayer)

from zope.publisher.interfaces.browser import IDefaultBrowserLayer
class IThemeSpecific(IDefaultBrowserLayer):
1 Like

This CMFPlone Issue: main_template overrides with z3c.jbot no longer work in Plone 5.2 might also affect you.

Thank you Norbert. This helped.

I added browser:jbot to configure.zcml (not browser/configure.zcml).

The declaration of the override folder in manifest.cfg is a bit confusing because of that:

directory = template-overrides

Will see how this evolves over time.