bobtemplates.plone
provides a mr.bob template to generate packages for Plone projects.
Package created with bobtemplates.plone
use the current best-practices when creating an add-on.
- Buildout
- The package is contained in a buildout that allows you to build Plone with the new package installed for testing-purposes.
- Tests
- The package comes with a test setup and some tests for installing the package. It also contains a robot-test that tests logging in. The buildout also contains a config to allow testing the package on travis that sends notifications by email to the package author.
- Profile
- The package contains a Generic Setup Profile that installs a browserlayer. For Plone 5 it also contains a uninstall-profile.
- Locales
- The package registers a directory for locales.
- Template-Overrides
- The package registers the folder
browser/overrides
as a directory where you can drop template-overrides using z3c.jbot. - Setuphandler
- The package contains a setuphandlers.py where you can add code that is executed on installing the package. For Plone 5 there is also a method in setuphandler.py that is run on uninstalling.
The package-types Dexterity and Theme add the following to Basic:
- Dexterity
- Adds a simple content-type (you get asked about its name) in
profiles/default/types/
with a python-schema ininterfaces.py
. - Theme
- Adds the Default Plone 5 theme Barceloneta in the folder
theme/
and registers it inprofiles/default/theme.xml
Add-ons created with bobtemplates.plone
are tested to work in Plone 4.3.x and Plone 5.
They should also work with older versions but that was not tested.
It should work on Linux, Mac and Windows.
Full documentation for end users can be found in the "docs" folder.
It is also available online at http://docs.plone.org/develop/addons/bobtemplates.plone/bobtemplates.plone/README.html
[buildout] parts += mrbob [mrbob] recipe = zc.recipe.egg eggs = mr.bob bobtemplates.plone
This creates a mrbob-executable in your bin-directory.
Call it from the src
-directory of your Plone project like this.:
../bin/mrbob -O collective.foo bobtemplates:plone_addon
Or to create a new theme package:
mrbob -O plonetheme.tango bobtemplates:plone_theme_package cd plonetheme.tango/ pip install -r requirements.txt buildout bootstrap bin/buildout
And launch the buildout using the command:
bin/instance fg
You can also install bobtemplates.plone
in a virtualenv.:
pip install bobtemplates.plone
With pip 6.0
or newer mr.bob
will automatically be installed as a dependency. If you still use a older version of pip you need install mr.bob
before bobtemplates.plone
.:
pip install mr.bob
Now you can use it like this:
mrbob -O collective.foo bobtemplates:plone_addon
This will create a new folder collective.foo. Inside the folder you have usually a buildout setup, which you can initialize as follow:
pip install -r requirements.txt
if you don't see any requirements.txt, add this file with the following content before you run the pip command above:
setuptools == 24.3.0 zc.buildout == 2.5.3
Now run:
buildout bootstrap
Your buildout should be ready to use now.
See the documentation of mr.bob for further information.
- Issue Tracker: https://github.com/plone/bobtemplates.plone/issues
- Source Code: https://github.com/plone/bobtemplates.plone
- Documentation: http://docs.plone.org/develop/addons/bobtemplates.plone/bobtemplates.plone/README.html
If you are having issues, please let us know.