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
03-09-2023 10:15 AM
Hi, I am also curious as to whether you found a solution for this. I also would like to hide a Child Topic 2 (e.g., Printers) from the Mega Menu, but have it still appear as a child topic when you visit the Child Topic 1 (e.g. Hardware) topic page in EC. Thanks in advance...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 10:12 AM - edited 03-14-2023 10:23 AM
Hello @mtymytk ,
You can hide hide the topics on the 3rd level of the Employee Center mega menu.
For this u need to remove connected content of that child topic.
After removing connected content logout & then login back to the instance. (Pls note sometime it will take few hours to reflect the changes in portal).
Result :
If there will be one connected content then it will be visible to you. So if you don't want to show it in mega menu then please remove its connected contents.
@mtymytk , please mark my answer as accepted solution and helpful. If it is works for you.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 11:44 AM
Is there a way to remove the Browse All button from a third menu of our own in the Mega menu .. .but keep it to the IT menu

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2023 03:51 PM
@mtymytk it is possible to hide the 3rd level of topics in the mega menu by creating a UI-Script in the global scope with the following code:
(function() {
function waitForElement(selector, timeout, interval) {
return new Promise(function(resolve, reject) {
var elapsedTime = 0;
var checkForElement = function() {
var element = document.querySelector(selector);
if (element) {
resolve(element);
} else if (elapsedTime >= timeout) {
reject(new Error("waitForElement: Timeout exceeded while waiting for element with selector >> " + selector));
} else {
elapsedTime += interval;
setTimeout(checkForElement, interval);
}
};
checkForElement();
});
}
waitForElement(".v045301ddeb503010ed7966d647522844", 30000, 100).then(function(element) {
var ecnavScope = angular.element(element).scope();
if (!ecnavScope) return;
var menuItemIds = new Set(ecnavScope.data.menuItems.map(function(item) {
return item.sys_id;
}));
for (var key in ecnavScope.data.menuItemToChildrenMap) {
if (!menuItemIds.has(key)) {
delete ecnavScope.data.menuItemToChildrenMap[key];
}
}
});
})();
You have to create a JS Include Dependency for that UI-Script and add it to your EC Portal Theme, then all 3rd Level Topics will be hidden.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 08:57 AM
Hello,
Did anyone get a resolution to this?
We are having the same issue in that we want to hide the child topic of a child topic in the mega menu.
But we still want to be able to access it from the parent topic page so removing the connected content is not possible:
Thanks,
Michael