Enable subcategories in SC Category page

JGerrity
Tera Contributor

Hello All,

 

I have searched the community and the web and can't find a solution to this issue.  People have posted similar but I haven't been able to find an answer...

 

Question, would like to change the SC Category Page so that the portal shows the sub-categories inside a category and not the items.    By default, OOB if there are no items within the category, but it does have sub-categories, the widget displays "No items in category" like below:

 

no_items.png

 

However, what I'm looking to do is to display the sub-categories as tiles or lists such as:

 

subcat_headings.png

 

I'm sure I have to clone the SC Category Page widget and add some server scripting, but not sure what or where to change to be able to show the sub-categories.


Any assistance would be appreciated!

6 REPLIES 6

PrashantLearnIT
Giga Sage

Hi @JGerrity 

 

Child Category will show under the category section only, why would you like a sub-category under the Items section? The subcategory is already showing on the left side.

 

 

 

********************************************************************************************************
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.

********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect


Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************

Hi @PrashantLearnIT ,

 


Because it's a matter of esthetics or appearance in the structure of the catalog/categories.   Instead of having "No items in category" displayed, it would be better to show the sub-categories of the "Parent".

It would be ideal if the Category of Computers & Accessories, showed a description field on the right with the links (lists or cards) to the further sub-categories.  Again, for visual continuity.


Regards,
Jason.

 

Hi @JGerrity,

 

I appreciate your question and requirement, however, just thinking out loud as a possible hybrid solution and saving on cloning the widget and the effort associated there etc and keeping aligned to Out Of Box, it is possible to show the cat items of both the Parent category and all of the subcategories. This is standard configuration.

Example - When selecting selecting the Category of 'Hardware' for example (which has sub categories of 'Mobiles' and 'Printers') - you can display all the items from Hardware and these Sub categories.

 

This can be easily configured (no code change) by right clicking on the widget and go to 'Instance Options' making sure the 'Show items from Child Categories' is checked.

 

See below screen shots.

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.



Thanks, Robbie

 

Screenshot 2024-10-25 at 18.10.38.pngScreenshot 2024-10-25 at 18.10.23.png

JGerrity
Tera Contributor

Hi @Robbie ,

 

Thanks for the response.  I'm familiar with that and enabling that setting.  It's actually not what I wanted and turned that off.  

I was just wondering if it's possible to show the sub-categories as tiles or lists themselves (as a catalog item would be list).   Again, really more for visual appearance or affect.

 

Appreciate the response though!

Cheers.