Expand my Community achievements bar.

How to change the resource of the Magento CIF Config in Category Field

Avatar

Level 3

Background:

 

I created an Content Fragment which contains an Category Selection Field as showing in Figure 1. According to the Figure 2, the user dialog shows the category resource which is "cif default". However, other category in my custom component can get the real Magento Category Resource.

 

Screenshot 2024-02-09 at 10.44.05 AM.png

Figure 1.

 

Screenshot 2024-02-09 at 10.44.19 AM.png

Figure 2.

Problem:

How should I change the category resource in the Category Selection Field.

 

Thank you very much.

 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

2 Replies

Avatar

Community Advisor

Hi @TrifaCh ,

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).
    The cifcategoryfield component also requires the cif.shell.picker clientlib. Make sure you have this, to add a clientlib to a dialog, you can use the extraClientlibs property. 

    For more info. on it you can follow below link
    https://experienceleague.adobe.com/docs/experience-manager-65/content/commerce/storefront/developing...


    Thanks

Avatar

Level 3

Thank you for replying, but I want to know how to control or setting my Category resource.