Vocabulary sub-templateΒΆ

Description

Adding a vocabulary to an existing add-on package.

With this sub-template, you can add a dynamic Vocabulary to a Plone package.

First create a Plone add-on package:

mrbob -O collective.todos bobtemplates.plone:addon

then change into the created folder collective.todos and create your Vocabulary:

mrbob bobtemplates.plone:vocabulary

It will ask you about the name of your Vocabulary class.

You will find the created Vocabulary in the vocabularies folder. You need to change the concrete code to generate your Vocabulary terms. You will also find your Vocabulary in the Dexterity schema editor in your Browser. Your Vocabulary is registered in the configure.zcml, there you can find also the name of the Vocabulary under which you can get it in Python code.