RE: hide the menu item in the content pane
Hi NoobGamer,
I'm not fully sure what you mean with the content pane. I do assume it is about a menu item in the menu structure.
This is possible with coding. You must subscribe to the delegate method SysMenuNavigationObjectFactory::checkAddSubMenuDelegate and implement coding like this:
internal final class HideMenuItemDemo
{
[SubscribesTo(classstr(SysMenuNavigationObjectFactory), staticdelegatestr(SysMenuNavigationObjectFactory, checkAddSubMenuDelegate))]
public static void menuItemVisibilityHandler(SysDictMenu _rootMenu, SysDictMenu _subMenu, SysBoxedBoolean _subMenuVisibility)
{
if (_subMenu.isMenuItem())
{
var metaElement = _subMenu.GetMenuItemMetaElement();
if (metaElement != null)
{
if (metaElement.Name == menuItemDisplayStr(MyMenuItemToHide))
{
if (myCondition == outcomeAsHide)
{
_subMenuVisibility.value = false;
}
}
}
}
}
}
Note that still a user and the system administrator would be able to find and open the item when using the navigation search and URL parameter editing.
I was playing with this last week for the intention of a new blog.