Add your own vocabulary

I'm writing a layout contribution, I added a suggestOneDirectory widget named city but I don't know where can I change/add my own directoryName (instead of l10ncoverage) that contains the vocabulary of cities to be shown on the list.

     <widget name="city" type="suggestOneDirectory">
          <label mode="any">City :</label>
        <properties mode="any">
          <property name="width">300</property>
          <property name="labelFieldName">label_{lang}</property>
          <property name="dbl10n">true</property>
          <property name="minChars">0</property>
          <property name="hideHelpLabel">true</property>
          <property name="directoryName">l10ncoverage</property>
          <property name="keySeparator">/</property>
          <property name="placeholder">Ville</property>
          <property name="documentSchemas">dublincore,layout_demo_schema</property>
          <property name="repository">default</property>
        <controls mode="any">
          <!-- enable ajax submit on change/click/select on demo application -->
          <control name="supportInsideInputWidgetEffects">true</control>

I'm not using Nuxeo Studio.

1 votes

1 answers




A csv file can be used as a source to define your own vocabulary

First specify the vocabulary in a file, for example “my-vocabulary.csv”:





Add this file to your project in the “resources” folder:


├── data
    ├── schemas
    └── my-schema.xsd
    └── vocabularies
        └── my-vocabulary.csv

Then use this extension point to source the csv file and update the model:

<extension target=""
    <directory name="my_business_purpose">
1 votes

It's working, and don't forget to add the schema for the new vocabulary. Thank you so much.