categories category choicelist Jahia 7.3 Jahia 8

How to use Category Selector as Single Selector?

Question

How to use Category Selector as Single Selector?

Answer

The Category Selector is multiple per default. It is not possible to use a single category selector. But instead the category selector a normal choiceList Initializer could be used like:

  - aSingleCategory (weakreference, choicelist[nodes='/sites/systemsite/categories//*;jnt:category;',sort]) internationalized indexed=no

The advantage: In the path of the categories, could be a specific subtree specified. So not all categories are available for the selection.