Category Picker

The category picker can be used in a component dialog as well in a similar way like the product picker.

The following snippet can be used in a cq:dialog configuration:

<category jcr:primaryType="nt:unstructured"
    sling:resourceType="commerce/gui/components/common/cifcategoryfield"
    fieldLabel="Category"
    name="./categoryId"
    selectionId="uid" />

The category picker field supports the following optional properties:

  • selectionId(id, uid, slug, urlPath, idAndUrlPath (deprecated), uidAndUrlPath (deprecated)) - lets you choose the category attribute to be returned by the picker (default = id).
  • multiple (true, false) - enable the selection of one or multiple categories (default = false)

Also, standard dialog field properties like name, fieldLabel, or fieldDescription are supported as well.

CAUTION
Same as the cifproductfield component the cifcategoryfield component also requires the cif.shell.picker clientlib. To add a clientlib to a dialog, you can use the extraClientlibs property. See Customizing Dialogs of the AEM Core Components documentation.
CAUTION
Starting with CIF Core Components version 2.0.0 the support for id was removed and replaced with uid. Adobe recommends using uid or urlPath as category identifier. Adobe continues to support id & idAndUrlPath only for projects using CIF Core Components version 1.x.

A full working example of the cifcategoryfield can be found in the CIF Core Components project.

Experience Manager


The True Cost of a Failed Implementation

Online | Session | General Audience

A failed implementation isn’t just an inconvenience — it costs real revenue. Poor execution and misaligned tools disrupt pipelines,...

Wed, Mar 19, 2:00 PM PDT (9:00 PM UTC)

Register

Elevate and Empower Teams with Agentic AI for Exceptional Experiences

Online | Strategy Keynote | General Audience

Elevate and empower your CX teams with AI that transforms creativity, personalization, and productivity. Discover how Adobe is...

Tue, Mar 18, 1:00 PM PDT (8:00 PM UTC)

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more