How to hide child topics in employee center mega menu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2023 01:38 AM
I would like to hide the topics on the 3rd level of the Employee Center mega menu.
For example, in the attached image, I want to display up to Hardware, Software, Network which are child topics of IT but not Computers and any other below Computers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 09:46 AM - edited 10-19-2023 09:50 AM
To show only root level of topics and its child , we will have to clone the widget Employee Center Navigation (employee-center-navigation) and change the server script in the cloned widget from
"megaMenuTopics = portalTaxonomy.getTopics(true, 2, false);"
to
"megaMenuTopics = portalTaxonomy.getTopics(true, 1, false);"
The second parameter in the getTopics determine how many levels of topics should the menu display .
This change will only hide the menu items in the mega menu, but they will still appear when you navigate to thier parent topic
After the cloned widget is saved with the changes name of cloned widget : cloned-employee-center-navigation
We need to associate it to the employee center header which acts as main header .
Open Widget Employee Center Header (employee-center-header) and in the server script change the widget id of employee center navigation to newly cloned widget with changes .
Logout and login to employee center , you will only see 1 level of topics in menu of employee center .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 01:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 04:58 AM - edited 10-20-2023 06:37 AM
Hi @MichaelCreatura ,
You will have to allow RCA's ,
Navigate to Restricted called access "https://<instance-url>/sys_restricted_caller_access_list.do?sysparm_userpref_module=87476f8667000300...
replace <instance-url> with your instance URL .
There will be RCA records with the status set as "Invalidated" open them and change the status to allowed and save them .
Or
If you have access to run the background script or create a fix script run the below query.
var gr = new GlideRecord('sys_restricted_caller_access');
gr.addQuery('status’,'IN’,'0,3’);
gr.query();
while(gr.next())
{
gr.setValue('status','2');
gr.update();
}
Please mark the answer as helpful if it helped you achieve what you need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 06:26 AM
Thanks @Nishant12 - that fixed the issue with the errors.
It still doesn't look like those steps worked for the main question of hiding Child Topics as when I do it and allow the restricted caller access it shows no navigation menu on the ESC.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 06:37 AM
Can you add screenshots of your changes and the Employee Center menu UI after the changes so that I can review if there is anything that's missed?