Customize PPM menu

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

Customize PPM menu

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

Best practices

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

By changing the menu.xml file, you will lose any menu change introduced in PPM 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 PPM 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 PPM menu:

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

    The menu.xml file is moved from conf/menus to /conf/menus/seed from 9.54. You should never modify it. 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, PPM first loads the built-in menu.xml file, then applies the delete_menu.xml file, and then applies the update_menu.xml file.

To make sure your menu customization remains on every PPM upgrade, replace the update_menu.xml and delete_menu.xml files with your own custom versions after upgrade.

Back to top

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.

Back to top

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.

      PPM will try to keep 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.

Back to top

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, PPM uses the menu key to identify the menu to be updated.

When PPM detects a menu item with the same id or key already exists in the same hierarchy, PPM replaces the existing menu item 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>

Back to top

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 PPM menu, you should also flush the cache "User Menus (usermenu)", otherwise, they will only view the changes in their next login.

Back to top