SC_categories - limit to only list single Catalog item category

Adam Larsen
Tera Contributor

Hi

 

I'm trying to limit the sc_catagori widget, forcing it to only show a single Service Catalog category. I've already cloned the OOTB one to a custom one. 

All the different community posts I've found show examples with code but appears to be for SN version apx 4-5 years older, hence the OOTB code is now changed, I cannot really figure out where to place my filter in the serverside script to just filter for a single category sys_id? 

Is there anybody who can show me the path?

2 ACCEPTED SOLUTIONS

I never recommend widget customization but if that's a business requirement, below code will work for you. this is the latest san Diego version.

find_real_file.png

View solution in original post

@Adam Larsen were you able to fix this using the above solution?

View solution in original post

7 REPLIES 7

Raghav Sharma24
Giga Patron

You dont need to clone widget for this. Mark all the other catalog items as "hide on service portal" true.

After this you will see only one category on potal that will be of catalog item which is visible on portal

Hi Raghav, 

 

That could be one approach, but since i do want numerous catalog items to be shown on the portal, just elsewhere, i do not persay wish to hide them. 

 

My wish case is to be able, via the widget, to control what items are diplayed at different pages - possibly having to customise the ootb widget to obtain it, but are there smarter ways, a different way could be an solution too. 

I never recommend widget customization but if that's a business requirement, below code will work for you. this is the latest san Diego version.

find_real_file.png

@Adam Larsen were you able to fix this using the above solution?