Share this page

# Customize menu using xml files

You can customize the menu by deleting an existing menu, adding a new menu, or changing the label of an existing menu.

Note: This method applies to the top navigation menu only. If you use the side navigation menu, customize the menu from Web UI. For details, see Customize menus.

In this topic:

## Customize the menu

This section describes the best practices and general steps to customize the menu.

Best practices

We strongly recommend that you never edit the menu.xml file to customize the menu, although this method still works.

By changing the menu.xml file, you will lose any menu change introduced in new versions, unless you manually reconcile the changes into your customized menu.xml file after each upgrade. Things become even more tricky when you have no idea what has changed in the menu between versions.

Instead, you should follow the process below to customize the PPM menu. This process does not overwrite menu.xml updates and makes it explicit what changes are made to the PPM menu.

To customize the menu:

1. Leave the /conf/menus/seed/menu.xml file untouched.

   You should never modify the menu.xml file in the /conf/menus/seed directory. Use it only when you want references on menu customization.

2. If you want to delete an existing menu item, edit the /conf/menus/custom/delete_menu.xml file.

   For details, see Delete a menu item.

3. If you want to add a new menu item or update an existing menu item, edit the /conf/menus/custom/update_menu.xml file.

   For details, see Add a new menu item and Update an existing menu item.

4. Flush the caches to make the changes to menu xml files take effect.

   For details, see Flush caches to make changes take effect.

5. When loading the menu, the system first loads the built-in menu.xml file, then applies the delete_menu.xml file, and last applies the update_menu.xml file.

6. To ensure your menu customization persist after every upgrade, replace the update_menu.xml and delete_menu.xml files in the content/conf/menus directory with your custom versions. On-premises users should also run the kSync.sh-at script after the upgrade. For details, see kSync.sh.

## Delete a menu item

You can delete an existing menu item.

To delete a menu item:

1. Open the /conf/menus/custom/delete_menu.xml file.

2. Add the xml block for the menu item.

   The id attribute is required to identify the menu item. Other attributes are ignored regardless of whether or not they match what are defined in the `menu.xml` file.

   If you want to delete a menu item along with its sub-menus:

   Add the xml block of the menu item without adding xml blocks of all its sub-menus.

   Example: Suppose you want to remove the whole SEARCH menu, add the following:

       <menu id="MENU_SEARCH">
       </menu>

   If you only want to delete a specific sub-menu under a parent menu:

   Specify the hierarchy of the sub-menu in the xml block. Make sure the hierarchy is the same as it is in the `menu.xml` file.

   Example: Suppose you want to remove the Search Requests menu from the SEARCH group, add the following:

       <menu id="MENU_SEARCH">
            <menu id="SEARCH_REQUESTS" bundle="CoreResources">
            </menu>
       </menu>

3. Save the file.

## Add a new menu item

You can add a new menu item.

To add a new menu item:

1. Open the /conf/menus/custom/update_menu.xml file.

2. In the menu.xml file, locate the line that represents the menu group under which you want to add the new menu item. Copy the line to the update_menu.xml file.

   For example, the Help menu is like the following:

       <menu id="MENU_HELP" bundle="CoreResources" type="HELP" >

3. Under the menu group line, add the xml block of the new menu item.

   Do you want to impose security requirements on the menu?

   - If no, just specify the id, key, and url attributes.
   - If yes, add `<security>` xml block. See the menu.xml file for references.

   Do you want the menu to be added in a specified sequence?

   - By default, the new menu item is added behind all the existing menu items in the same hierarchy.

   - If yes, set sorting="seq" in the menu group line, and add the seq attribute for all the child menu items.

     The system keeps the menu items without the seq defined in the same order as defined in the menu.xml file as long as it does not conflict with the sorting criteria.

   Example: Suppose you want to add a menu item pointing to PPM Online Help Videos, and place it right under the online help menu, add the following.

       <menu id="MENU_HELP" bundle="CoreResources" type="HELP" sorting="seq">
          <menu id="HELP_ONLINE" seq="1">
          <url>......</url>
          </menu>
          <menu id="HELP_VIDEOS" key="PPM Help Videos" seq="2">
          <url>https://admhelp.microfocus.com/ppm/en/<ppm_version>/Help/Content/PPM_Video.htm</url>
          </menu>
       </menu>

4. Save the file.

## Update an existing menu item

You can update an existing menu item.

To update an existing menu item:

Add the menu item in the update_menu.xml file. Make sure the menu id attribute is the same as it is in the menu.xml file. If id is not defined, the menu key is used to identify the menu to be updated.

When a menu item with the same id or key already exists in the same hierarchy is detected, the existing menu item is replaced with what is defined in the update_menu.xml file.

What can be updated

You can update all attributes of a menu item, such as url, key, bundle, seq, and security. The attributes that are not defined in the update_menu.xml file will be left untouched.

If you want to change the label of a menu item and do not need it to be translated into multiple languages, ignore the bundle attribute and just update the key attribute.

Example: Suppose you want to change the label of Search Requests to Search Tickets, add the following:

    <menu id="MENU_SEARCH" key="menu.search">
       <menu id="SEARCH_REQUESTS" key="Search Tickets">
       </menu>
    </menu>

## Flush caches to make changes take effect

For the changes to menu xml files to take effect, run the kRunCacheManager.sh script to flush the cache "Global Menu (globalmenu)". For details of kRunCacheManager.sh, see kRunCacheManager.sh.

Note: If you want the currently logged-in users to get the updated menu, you also need to flush the cache "User Menus (usermenu)". Otherwise, they will only view the changes in their next login.

## See also

- Customize menus
- Browse the menu

https://admhelp.microfocus.com PPM 8942
Tips to improve your search results... OpenText™ Project and Portfolio Management Help Center PPM Help 26.2-26.3 All View Local Help Center View Online Help Center Version: