Personal tools
You are here: Home Documentation Tutorials ArchGenXML 1.x- Getting started Third Party Product Integration: ATVocabularyManager
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

Third Party Product Integration: ATVocabularyManager

ATVocabularyManager is a product for letting site managers define vocabularies for fields through-the-web or by import from XML files. ArchGenXML can generate the necessary code to use this product.

Bernhard Snizek

ArchGenXML is a code-generator for CMF/Plone applications (Products) based on the Archetypes framework. It parses UML models in XMI-Format (.xmi, .zargo, .zuml), created with applications such as ArgoUML, Poseidon or ObjectDomain. This tutorial will help you get started developing applications with the aid of ArchGenXML.
Page 11 of 17.

ATVM manages dynamic vocabularies. It installs a tool, where a site Manager can add, change and delete vocabularies. These vocabularies can then be used anywhere on the site.

You can download ATVocabularyManager from the Plone.org products area: http://plone.org/products/atvocabularymanager

Using simple flat vocabularies

Adding ATVM-vocabs to your UML model is quite easy.

  1. Add a selection or multiselection field to your type.
  2. Add a tag vocabulary:name and give it a name, let's say countries
  3. Add a tag vocabulary:type with the value ATVocabularyManager

We are now finished with the UML. Save it and let AGX do the work. What still is missing, is to install the countries vocabulary. Therefore:

  • Add a file called AppInstall.py in the /Extensions folder of your product
  • Add the following code (this sets up a vocabulary countries with the given values, and registers it with ATVocabularyManager):
       from Products.ATVocabularyManager.config import TOOL_NAME as ATVOCABULARYTOOL
       from Products.CMFCore.utils import getToolByName
       from Products.ATVocabularyManager.utils import createSimpleVocabs
    
       def install(self):
         """let's install the countries vocab"""
    
         vocabs = {}
         vocabs['countries'] = (
                ('ice', u'Iceland'),
                ('nor', u'Norway'),
                ('fin', u'Finland'),
                ('tyr', u'Tyrol'),
                ('auf', u'Ausserfern'),
            )
         portal=getToolByName(self,'portal_url').getPortalObject()
         atvm = getToolByName(portal, ATVOCABULARYTOOL)
         createSimpleVocabs(atvm, vocabs)
    

Using simple tree vocabularies

If youre interested in using and creating hierachical vocab:

  • use additional tag vocabulary:vocabulary_type with value TreeVocabulary,
  • have a look at the doc-string of Products.ATVocabularyManager.utils.createHierarchicalVocabs.

Using vocabularies based on the IMS Vocabulary Definition Exchange (VDEX) format.

VDEX is a simple XML based format to define flat or hierachical multilingual vocabularies. ATVocabularyManager supports VDEX in most of its dialects.

To tell Archetypes to use them in your UML first take Steps 1 to 3 of the first section and skip the import part. Then add a tag vocabulary:vocabulary_type and give it the value VdexVocabulary.

Now add a folder called data in your products folder. Inside the /data folder create a new file called countries.vdex (example). It will be imported automatically on install or reinstall, but only if a vocabulary named countries does not exist.

 
by Bernhard Snizek last modified August 30, 2007 - 10:57
Contributors: jensens, optilude, reinout, frisi, fifer, et al
All content is copyright Plone Foundation and the individual contributors.

link broken?!

Posted by Stefan Kueppers at October 7, 2005 - 13:17

Hi !

I have been looking to get hold of the ATVocabularyManager. The link http://svn.plone.org/archetypes/ATVocabularyManager/ is broken at this time. What is the status of this? Anybody know where to get hold of it now? Steff

yes, a lot of doc links are out of date

Posted by Justin Ryan at October 19, 2005 - 20:02

Add a prefix to links that look like this, so it becomes:

http://svn.plone.org/svn/archetypes/ATVocabularyManager

vocabularymanager download

Posted by Harald Friessnegger at November 2, 2005 - 13:20

to browse the svn repository visit http://svn.plone.org/view/archetypes/ATVocabularyManager/

seems that you need a user to check out the product: svn co http://svn.plone.org/archetypes/ATVocabularyManager/trunk does not work

SVN checkout

Posted by Michael Ang at May 29, 2006 - 03:39

try using svn co https://svn.plone.org/svn/archetypes/ATVocabularyManager/trunk ATVocabularyManager


For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by