Print

Defining new menu items under an existing group

About this task

The configuration menu.xml file specifies the location of and properties for your new menu items.

Procedure

  1. In an ASCII text editor, open the configuration menu.xml file in the TomcatHome/lib/extensions/UniqueDirectoryName/config directory, where TomcatHome is the directory in which the Tomcat servlet engine software is installed and UniqueDirectoryName is the directory defined as described in Defining a unique extensions directory. The default is /opt/Tomcat/tomcat.
  2. Create the basic template for menu.xml by adding the following tags:
    <?xml version="1.0" encoding="UTF-8"?>
    <navigationmenu 
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:noNamespaceSchemaLocation="menu.xsd">
    </navigationmenu>
  3. For each existing menu group for which a new menu item will be defined, add the <menu> and </menu> tags just before the </navigationmenu> tag.
  4. Specify the following menu attributes:
    Attributes Example Description
    type=”group”, where type defines the type of the menu. To specify the type of the menu as group, specify type=”group” This attribute defines the type of the menu tag.
    tag=”groupTag”, where groupTag is the identifier the system uses to identify the group. To assign the name specify, tag=“existingMenuGroupIdentifier” The identifier of the menu group. This identifier must be unique across all menu groups and menu items in the configuration menu.xml file.
    For Menu Group... Set tag to...
    User Management tag=menuGroupUserManagement
    Real-Time Monitoring tag=menuGroupRealTimeMonitoring
    System Maintenance tag=menuGroupSystemMaintenance
    System Management tag=menuGroupSystemManagement
    System Configuration tag=menuGroupSystemConfiguration
    Security tag=menuGroupSecurity
    Reports tag=menuGroupReports
  5. For each menu item you want to add, specify the <item> tag after the <menu> tag but before the corresponding </menu> tag, and specify the following attributes:
    Property Example Description
    type=”item”, where type defines the type of the item. To specify the type of the menu item as item, specify type=”item” This attribute defines the type of the item tag.
    render=[true|false], where render is either true or false. To instruct the EPM to display the item in the menu group, specify render=true If you set this property to false, the EPM does not display the menu group.
    tag=itemTag, where itemTag is the identifier the system uses to identify the item. Specify tag=”newMenuItemIdentifier” The identifier of the menu item. This identifier must be unique across all menu groups and menu items in the configuration menu.xml file.
    action=displayURL, where displayURL is the URL that you want the system to display when a user clicks this item. To instruct the EPM to open admin.ops.page.html when the user clicks on the second item of the fifth menu group, specify action=”http://my.site.com/custom_pages/admin.ops.page.html” Determines what page Experience Portal displays when the user selects the menu item.
    importantImportant:

    Experience Portal does not validate this URL.

    newWindow=“[true|false]”, where newWindow is either true or false. To instruct the EPM to open a new page when the user clicks on the menu item of the menu group, specify newWindow=true If this option is set to true, Experience Portal opens the specified URL in a new browser window.

    If you do not specify this property, it defaults to false.

  6. For each new <item> tag, specify a </item> tag to end the menu item definition.
  7. Save and close the file.

Example

The Report menu group with the menuItemMyCustomReport item added could look like this:

<?xml version="1.0" encoding="UTF-8"?>
<navigationmenu
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:noNamespaceSchemaLocation="menu.xsd">
<menu type="group" render="true" tag="menuGroupReports">
    <item type="item" render="true" tag="menuItemStandardReports" 
         action="reports/standardReports.jsf?initializeBean=true">
    </item>
    <item type="item" render="true" tag="menuItemCustomReports" 
         action="reports/customReports.jsf?initializeBean=true">
    </item>
    <item type="item" render="true" tag="menuItemScheduledReports" 
         action="reports/scheduledReports.jsf?initializeBean=true">
     </item>
    <item type="item" render="true" tag="menuItemMyCustomReport"
        action="http://my.site.com/custom/custom.report.page.html" newWindow="true">
     </item>
</menu>
</navigationmenu>