[z3-five] Using vocabularies for Choice fields where the vocabulary is acquired
Martin Aspeli
optilude at gmx.net
Wed Dec 27 22:33:20 CET 2006
Martin Aspeli wrote:
> Hanno Schlichting wrote:
>
>> I'm not sure that my approach is by any means good or advisable but you
>> could take a look at the PortalTypesVocabulary in
>> plone.app.controlpanel.vocabularies and its usage on the search control
>> panel defined by the ISearchSchema in search.py in the same package.
>>
>> The code can be found at
>> http://dev.plone.org/plone/browser/plone.app.controlpanel/trunk/plone/app/controlpanel
>>
>>> Can anyone point me to some code or documentation that shows how to wait
>>> until run-time to define the vocabulary, and gives me the current
>>> context from which to do so?
>> Maybe you can even just use the vocabulary I've already written in which
>> case we might need to move it to a more general package.
>
> Ah, excellent Hanno. :)
>
> I can use this just by name, I guess. Having a package
> (plone.app.vocabularies?) with common vocabularies (portal type,
> workflow states, roles, groups, users...) may make sense.
>
> I'm adding roles and groups to plone.app.contentrules.vocabularies, if
> you're up for the task of consolidating (I don't have time right now).
btw, considering the namespace is global (utility names) I suggest we
use a dotted name, like plone.vocabulary.PortalType or what not.
Martin
More information about the z3-five
mailing list