Friday, July 29, 2011

Hiding Navigation Menus in UCM 11g

I was facing problem in hiding the menus that were coming by default - Search and Check In in UCM11g. It took a little time to find out the syntax to make the OOTB menus disappear in 11g.

There is a dynamic html named navigation_filter_rset_menu_item which is used for this purpose. This dynamic html is defined in the file "std_nav.idoc". Follow the below steps to hide the default menus in UCM 11g.

1) Create an environment variable in your component's environment.cfg file.
ShowOOTBMenus=false

2) <@dynamicdata CoreMenuItems@>
id, label, linkType, linkData
MY_MENU, MY Custom Menu, cgi, IdcService=CUSTOM_SERVICE
<@end@>

3) <@dynamicdata CoreMenuItemRelationships@>
parentId, id, loadOrder
MENU_A, MY_MENU, 30
<@end@>

4) <@dynamicdata CoreMenuItemsFlags@>
id, flags
NEW_CHECK_IN, isContributor:isShowOOTBMenus
<@end@>

5)<@dynamichtml navigation_filter_rset_menu_item@>
<$include super.navigation_filter_rset_menu_item$>
<$if not tmpDeleteRow$>
<$if not isTrue(#env.ShowOOTBMenus) and flags like "*isShowOOTBMenus*"$>
<$tmpDeleteRow = 1$>
<$endif$>
<$endif$>
<@end@>

This should hide the Check In menu from the top horizontal menu. This is the same process for hiding the left navigation menus and sub menus.

Hope this helps.