If necessary, you can change the set of links that appear in the left-hand menu of the Web Client framework. Ideally you should avoid making changes to the menu and instead add links to the home page as covered in Customizing the Web Client Main Menu.
The following sections describe how the main menus work and provide procedures for adding new links.
- How Web Client Menus are Defined
- Starting the Main Menu Declaration
- Defining Menu Items
- Link Destinations
- Adding Links to the Web Client Home Page
How Web Client Menus are Defined
The menus for the Web Client are defined with menu declarations. Menu declarations are written in XML and stored in files on the Application Server. For each menu item, a menu declaration identifies the label that the user sees and the destination of the link when a user selects the item.
Menu declarations are used for both the main menu shown in the framework, and the drop-down menus used throughout the Web Client pages. You normally only need to customize the main menu.
The XML menu declaration for the main menu is defined in the file menu.xml. This file is installed in the etc directory of the Application Server machine. The menu declaration itself is called mainMenu.
In a typical installation, the etc directory is:
C:\Program Files\LexisNexis\InterAction\AppServer\iahome\etc.
If you want to alter this main menu, you should first copy and paste the declaration into a separate file. InterAction Application Server installs a blank menu XML file called localMenus.xml for this purpose. You use this version for customizing the menus.
The localMenus.xml file is installed to the local directory of the Application Server machine.
In a typical installation, the local directory is:
C:\Program Files\LexisNexis\InterAction\AppServer\iahome\local.
Configuring the main menu requires you to edit XML files. Before using the procedures in this section to change the main menu, you should be familiar with the basics of XML. You should understand the following terms and concepts:
- Elements and tags
- The difference between opening and closing tags
- Nesting a tag within another tag
- Attributes
- Assigning values to attributes
- Making an XML document well-formed
If you are unfamiliar with these concepts, refer to Overview of Editing XML Files for an overview. Note that you need to be comfortable working with XML in order to configure the InterAction Web Client.
Starting the Main Menu Declaration
The menu declaration for the main Web Client menu starts with a <menuItem> XML tag similar to the following:
<menuItem id='mainMenu'>
The <menuItem> tag starts a new menu item; the id attribute assigns it a name. All of the items within menu are nested between the starting <menuItem> tag and a closing tag:
</menuItem>
Defining Menu Items
A menu item is defined with a block of XML like the following:
Defining a Menu Item in XML
<menuItem>
<label>$(Contact Types)</label>
<methodName>contact-lists-home</methodName>
<url>
contact-lists-home?folderClass=1&searchDescription=$(Contact Types)
</url>
</menuItem>
This XML block can be interpreted as follows:
- The <menuItem> tag starts the item. This is normally nested within another <menuItem> tag that starts the entire menu.
- The <label> tag provides the text displayed for the menu item. In the above example, a variable is used for the label. The $(Contact Types) variable contains the term for contact types in your environment.
- The <methodName> tag is the name of the page method that defines the page you want to display. Although this is included in several of the out-of-the-box pages, it is not necessary if you provide the <url> tag.
- The <url> tag provides the full URL of the page to display, including any parameters that should be passed to the page.
The main menu consists of several of these blocks, all nested under the <menuItem> tag that starts the entire menu.
Link Destinations
For each menu item that appears as a link, you specify a link destination with the <url> tag. When linking to another Web Client page, you provide the name of the page and any parameters it requires in the URL.
For example, note the following URL used for the Alumni menu item:
URL for Alumni Menu Item
<menuItem>
<label>$(Contact Types)</label>
<methodName>contact-lists-home</methodName>
<url>
contact-lists-home?folderClass=1&searchDescription=$(Contact Types)
</url>
</menuItem>
This URL breaks down as follows:
- contact-lists-home is the name of a Web Client page that displays a “list of lists.” This page accepts several parameters that define which types of lists to display (contact types, marketing lists, or working lists).
-
The items after the question mark (?) are the parameters to pass to the page. Each parameter is separated with the following symbol:
&
This is a special XML character that is converted to an ampersand (&) when the page is displayed.