Expanding nested categories in Service Portal by default

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2017 09:56 AM
On our Service Portal I have a requirement that Nested categories be expanded by default So that you do NOT have to click the little folder icon to expand the sub categories.
Has anyone been able to figure this out?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2018 11:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2018 03:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2019 05:49 AM
2. In the server script replace the line
categoryDetails.showChildren = (categoryDetails.sys_id === categoryId);​
by
categoryDetails.showChildren = (categoryDetails.sys_id === categoryId || categoryDetails.sys_id == '<sys_id of the category you to expand by default>');
e.g.
//XHU 04/01/18 - Always Display children of category "Service Utilisateur" - 95ff5835dbbfe60084e7bc2ffe9619aa
categoryDetails.showChildren = (categoryDetails.sys_id === categoryId || categoryDetails.sys_id == '95ff5835dbbfe60084e7bc2ffe9619aa');​
Before I perform the modification, the categories are all collapsed when I go to the service catalog homepage
After I have performed the 2 steps described aboved, the category "Service Utilisateur" is expended by default when I go to the service catalog homepage
Since is not much recommend to hardcode sys_id in the script, I would even go further to put the category sys_id as an instance options of the widgets.
Ximizu
Co-founder of CloudSpirit

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2020 06:44 AM
This worked perfectly! Thanks!