Hiding the Standard Check-In and Standard Search menu items
By Kyle Hatlestad on Aug 10, 2011
On 3 separate comment threads on my blog, I’ve had people asking how to hide the Standard Check-In and Standard Search menu items in UCM/URM navigation. Given that it seems to be a popular topic, I thought I would cover it here.
Out of the box, UCM does not give you a way to hide these menu choices. There aren’t any secret configuration flags or tricks you can do with Idoc Script to get them to disappear. You need to have a custom component to do it. But the good thing is the code to do it is pretty minor. And because the menus changed between 10g and 11g, the code is slightly different between the two. But I’ll cover both here.
The next portion depends upon the version you are running. On 10g, the code would look like:
And that’s it! Just deploy your component and your menu choices should be gone. Of course, you can always go beyond that and show the menus if the user is an admin or such. Or hide just one or the other based on configuration entries.
In 11g, the code would look like:
var searchmenu= YAHOO.widget.MenuManager.getMenu(“MENU_A_SEARCH”);
navBuilder.deleteItem(“MY_PERSONAL_SEARCHES_” + (searchmenuitems.length-<$lenghthCount$>));
var checkinmenu= YAHOO.widget.MenuManager.getMenu(“MENU_A_NEW_CHECK_IN”);
navBuilder.deleteItem(“MY_PERSONAL_CHECKINS_” + (checkinmenuitems.length-1));
In this case, there isn’t an Idoc variable that is maintaining a count anymore. So it has to be calculated through the MenuManager.
For a pre-built version of the component, I have one available on our sample code site. It has logic to detect if you are on 11g or 10g and apply the appropriate command to delete the menu items, so it can be used in either version.