Dexterity content default-dictionary with a set of editable values

Hi everyone,

I'm trying to create a "standard" Dictionary containing a number of states for the specific content type. Example of such dictionary:

states_dict = {
		'StateOne':False,
		'StateTwo':False,
		'StateThree':False
	      }

This data is in turn used to change the "state" of the content, depending on a few different external entities (result of api request-responses for example). And after the content has passed the conditions required for a state, StateOne for instance, is set to True on this content object.

Furthermore I am looking to try and make this states_dict editable, to allow for additional external operations to be adopted in the future.

Is there a way to create a userexpandable default-Dictionary for a content type? Perhaps something related to how vocabularies are used/explained in the mastering plone training?

Any pointers in the right direction, documentation or suggestions is grealty appreciated!

Kind regards, Tony

For the second part of the question: Plone had in previous versions add-ons for managing vocabularies. I am not sure it they are ported to Plone 5.

Other option:

  • write a control panel for your add-on with an editable field that hold the possible values. A site administrator would be allowed to change the values

  • write a "configuration" object that provides an editable field holding the specific configuration. The configuration object likely has to be a singleton or must be retrievable in some way

1 Like

Hi Andreas,

Will look into the options you suggested, thank you very much for responding. :slight_smile:

Kind regards, Tony