bobtemplates.plone provides mr.bob templates to generate packages for Plone projects.
Note
With the plonecli, we have a nice command line client for bobtemplates.plone. We highly recommend to use the plonecli, because it adds auto completion and some nice helpers to bobtemplates.plone.
Package created with bobtemplates.plone use the current best-practices when creating an add-on. It also support's GIT by default, to keep track of changes one is doing with the bobtemplates.
- addon (it is provided as a base for the rest of subtemplates, but it is created using cookieplone)
- buildout (useful setup a development buildout or to test new pending Plone versions)
These templates are meant to be used inside a package which was created by the addon template.
- behavior
- content_type
- controlpanel
- form
- indexer
- mockup_pattern
- portlet
- restapi_service
- subscriber
- svelte_app
- theme
- theme_barceloneta
- theme_basic
- upgrade_step
- view
- viewlet
- vocabulary
Add-on's created with bobtemplates.plone version 7.x and higher are tested to work in Plone >= 6.0 and Python >= 3.11.
If you need to create Plone packages for older versions of Plone and Python, please use bobtemplates.plone 6.x or 5.x. It should work on Linux, Mac and Windows.
If you want to use plonecli and bobtemplates.plone in projects created by cookieplone, you need to add the backend package name to the bobtemplate.cfg file into the main section.
package.dottedname = tagung.plone.de
package.browserlayer = BrowserLayerWill work for package without a src folder in the structure, from version 6.4.3 on.
Full documentation for end users and template developers can be found on bobtemplatesplone.readthedocs.io.
For easy usage see: plonecli
You can install bobtemplates.plone as every other normal Python package with pip user global or inside a virtualenv or better with pipx.
pip install bobtemplates.plone --userpipx installs bobtemplates.plone and all dependencies in a global isolated virtualenv.
pipx install bobtemplates.ploneYou can also install bobtemplates.plone with pip in a virtualenv.
If you don't have an active virtualenv, you can create one inside your project directory.
python3 -m venv venvThen either activate the virtualenv:
source ./venv/bin/activateor just use the binaries directly inside the bin folder as below:
./venv/bin/pip install bobtemplates.ploneAs bobtemplates.plone is a template for mr.bob, we use mrbob to run the templates.
If you are using pipx or have bobtemplates.plone globally installed, you can just use mrbob directly.
mrbob bobtemplates.plone:addon -O src/collective.fooIf you are using an unactivated virtualenv, you can use mrbob like this:
./venv/bin/mrbob bobtemplates.plone:addon -O src/collective.fooIf you are using an activated virtualenv, you can use mrbob like this:
Activate your virtualenv:
source venv/bin/activatemrbob bobtemplates.plone:addon -O src/collective.fooThis will create your Plone package inside the src directory.
See the documentation of mr.bob for further information.
You can set all mr.bob configuration parameters in your ~/.mrbob file.
Here is an example:
[mr.bob]
verbose = False
[variables]
author.name = Maik Derstappen
author.email = md@derico.de
author.github.user = MrTango
plone.version = 5.1.3-pending
#package.git.init = y
#package.git.autocommit = n
#package.git.disabled = n
[defaults]
dexterity_type_global_allow = n
dexterity_type_filter_content_types = y
dexterity_type_activate_default_behaviors = n
dexterity_type_supermodel = n- Issue Tracker: https://github.com/plone/bobtemplates.plone/issues
- Source Code: https://github.com/plone/bobtemplates.plone
- Documentation: https://docs.plone.org/develop/addons/bobtemplates.plone/docs/ or https://bobtemplatesplone.readthedocs.io/en/latest/
If you are having issues, please let us know. Just open an issue here.