Expand my Community achievements bar.

SOLVED

Category component in CIF core components

Avatar

Level 2

Hello Team,

 

is there any category component in CIF core component? While exploring, I came to know about Featured Category List: 

https://github.com/adobe/aem-core-cif-components/tree/master/ui.apps/src/main/content/jcr_root/apps/...

 

Anyone used this component? In my case, I wanted to have a component, where I will pass the category ID (or the category name: will be unique) to a graphQL. In the response, I will get the sub category details( sub category names and its images).

 

For example:  category1 -> In the response, I will get

sub-category1, abc.com/images/category1.jpg

sub-category2, abc.com/images/category2.jpg

sub-category3, abc.com/images/category3.jpg

 

I thought of using the Featured Category List component.

 

cc @Hemalatha  @AMANATH_ULLAH  @MukeshYadav_ @pulkitvashisth @Daniel_Gordon 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@MaheshaGu 

I havent used featuredcategorylist component, but from the documentation, it looks to be a kind of card component where authors can author multiple categories manually using multified in static pages and set href to redirect to respective category pages

It does not fetch subcategory details

 


Amanath Ullah

View solution in original post

6 Replies

Avatar

Community Advisor

 

@MaheshaGu 

You can use productlist component. It provides the details of all the products related to particular category

https://github.com/adobe/aem-core-cif-components/tree/master/ui.apps/src/main/content/jcr_root/apps/...

 

 

 


Amanath Ullah

Avatar

Level 2

Thanks @AMANATH_ULLAH   for your reply.

I need to use the component productlist that you have mentioned for a scenario: Get list of products based on category.

But, in my case, before this, I need to get the sub category list only.

I mean I will pass the category ID (or the category name: will be unique) to a graphQL. In the response, I will get the sub category details( sub category names and its images).

 

For example:  category1 -> In the response, I will get

sub-category1, abc.com/images/category1.jpg

sub-category2, abc.com/images/category2.jpg

sub-category3, abc.com/images/category3.jpg

Avatar

Community Advisor

@MaheshaGu 

To get the sub categories, you will have to use custom graphQl query.

productlist will only give the products related to category 


Amanath Ullah

Avatar

Correct answer by
Community Advisor

@MaheshaGu 

I havent used featuredcategorylist component, but from the documentation, it looks to be a kind of card component where authors can author multiple categories manually using multified in static pages and set href to redirect to respective category pages

It does not fetch subcategory details

 


Amanath Ullah

Avatar

Administrator

@MaheshaGu Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni