Document Acties

Maik Derstappen: Subtemplates in bobtemplates.plone or on the way to plonecli

Opgeslagen onder:

Talk by Maik Derstappen at the Plone Conference 2017 in Barcelona.

A long time ago, creating a Plone package was as simple as using ZopeSkel and then ZopeSkel sub templates to add for example a new content type. But ZopeSkel is dead.

Plone is using the new mr.bob already for years, with bobtemplates.plone as main template for a new Plone project. But there were only basic templates, no list of templates, no way to add a content type or other things with a sub template, a hard to remember command. So let's fix that!

My vision: give me a tool which helps for:

  • creating different projects, like an add-on or a buildout
  • extending packages with content types, vocabularies, a theme
  • provide best practice skeletons

Something like this:

$ pip instll plonecli
$ plonecli -l
templates:
 - addon
   - content_type
   - portlet
 - buildout
$ plonecli add content_type

Standalone templates:

  • addon: basic Plone addon
  • buildout: development/project buildout
  • theme_package: full stand-alone theme package, based on Barceloneta, with grunt setup

Sub templates:

  • content_type: Dexterity CT with XML or zope.schema
  • vocabulary: dynamic vocabulary
  • theme: advanced theme, including themesitesetup and themefragments
  • more to come: tile, behavior, portlet

I have a fork of mr.bob that can list templates.

On plonecli you could use shorter, more easier to remember commands, and I want autocompletion to make it even easier.

We will sprint on this, so please join.