How to display subcategories when category is selected/clicked in serviceportal

Haceena Shaik
Tera Expert

Hi team,

 

I want to display subcategories instead of catalog items when a category has child categories in Service Portal.

 

For example, 
In the below attached screenshot, when I click on Hardware category, it displayed related items in the content frame. But I want to display subcategories like (Desktop, Mobiles, Printers etc.,) in the content frame.

Please help me how to achieve this requirement.

 

HaceenaShaik_0-1699939713593.png

 

Thanks in advance.

Regards,

Haseena

2 REPLIES 2

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Haceena Shaik 

 

This is OOTB behaviour and I don't think it make big difference in user experience. Also it required code changes. Better we educate the user the intent behaviours of this.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Jack Littlewort
Giga Guru

Hi @Haceena Shaik,

 

You would need to create a custom widget to achieve this functionality. 

 

You could clone the out of the box widget and re-use it's design to achieve your requirement.

 

When a category is selected it puts a parameter into the URL which is the sys_id of that category. You would need to retrieve this parameter in your widget and use it to query the sub categories of it.