Hide categories in SC Categories widget

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2020 04:08 PM
I would like to edit my clone of the sc_categories widget so that it does not display the list of Categories until a Catalog is selected; I don't want it to display all Categories in all Catalogs. Is there a way to do this?
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2020 09:03 AM
Below solution should help you
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2020 11:48 AM
My requirement is a little different than that. I already have user criteria on the catalogs/categories that need it, but most users will have access to multiple catalogs and I don't want them to see a long list of all the categories in all the catalogs when they go to the Catalog page (it will be confusing to many of them). I'd like it to completely hide the categories, for all users regardless of which catalogs and categories they have access to, until the user selects an individual catalog.
My preferred way to do this would be to remove the 'All' option from the Catalogs dropdown and replace it with '-- None --', but I do not know how to edit the widget script to accomplish this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2021 10:36 AM
Hi Sarah,
Were you able to do this? I have a similar requirement, if so could you please share in this post?
Thank you in advance.
abrouf

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2021 01:49 PM
Hi abrouf,
So as to avoid spending an inordinate amount of time trying to figure it out, we ended up going with a much simpler solution, which was to change the title above the dropdown from 'Catalogs' to 'Filter Catalogs' (it can be found in line 54 of the Server script on the OOB widget):
msg.catalogTitle = options.catalog_title? gs.getMessage(options.catalog_title) : gs.getMessage('Catalogs');
change to
msg.catalogTitle = options.catalog_title? gs.getMessage(options.catalog_title) : gs.getMessage('Filter Catalogs');
That way the users understand that what they are seeing is every category and they can narrow down the options by choosing a catalog.