Viewlet sub-template

Description

Adding a Viewlet to an existing add-on package.

With this sub-template, you can add a Viewlet to a Plone add-on package.

First create a Plone add-on package:

mrbob -O collective.todo bobtemplates.plone:addon

then change into the created folder collective.todo and create your first Viewlet:

mrbob bobtemplates.plone:viewlet

It will ask if you need Python class and template file, you can have both or at least one to have a working viewlet. Based on the input it will ask about class name, template name or both. By default it will suggest you to use class name as viewlet name but you can also change it. This will create a viewlet registered to IAboveContentTitle viewlet manager and on IDocument interface.

Example

$ cd collective.todo

Add a Viewlet