Add context-sensitive help into a Tools User Interface Center
The following steps detail how to add context-sensitive help:
- Create or modify the existing help HTML pages. The help pages for context-sensitive help, that is the help that displays when a user clicks Help from a browser-based tool, are in the following directory: WC_installdir\CommerceHelpSystem\eclipse\plugins\com.ibm.commerce.base.doc.
- Navigate to the directory:
- WC_installdir\CommerceHelpSystem\eclipse\plugins\com.ibm.commerce.base.doc.
- RAD_installdir\eclipse\plugins\com.ibm.commerce.base.doc
This directory contains a file called doc.zip.
- If desired, backup doc.zip if you want to retain the original help text.
- Extract doc.zip to a temporary directory, for example, C:\temp.
- The temporary directory contains a directory called f1. This directory contains all the context-sensitive help files.
- Modify existing files, or add new files to this directory.
- Compress the files back into a ZIP file using a ZIP compression utility.
- Copy the file into
- WC_installdir\CommerceHelpSystem\eclipse\plugins\com.ibm.commerce.base.doc
- Stop and start the WebSphere Commerce Information Center.
- If the HTML page is new, that is, you created it in step 1:
- Define a help key by adding an entry to the help map XML file
For WebSphere Commerce Accelerator, the help map file is WC_installdir\xml\tools\common\AcceleratorHelpMap.xml.
Add a line similar to the following code fragment:
<helpkey default="MC.default.Help" path="/help/index.jsp?lang=$locale$&topic=/com.ibm.commerce.base.doc/f1/"> <help key="MC.notebook.panel1.Help" file ="sample_help1.html"/> </helpkey>where MC.default.Help is the default help key, which acts as the main help page for cases in which no help key is defined, MC.notebook.panel1.Help is the name of the help key and sample_help1.html is the help file name.
If you are working on a different Tools User Interface Center, find the help map XML file name by looking at the top of the tools center definition XML file in a line similar to the following code fragment:
<menu helpMap="common.MerchantCenterHelpMap">- Reference the help key in your element's defining XML file
In your user interface element's XML, reference the help key. The method by which you reference the key depends on the user interface element you are creating.
- If you are writing a panel inside of a notebook, a wizard, or a dialog, the help key is defined in the XML file as shown below:
<panel name="Profile" url="/wcs/tools/sample/notebookPanel1.html" helpKey="MC.notebook.panel1.Help" />- If you are writing a dynamic list page, the help key is defined in the XML file as shown below:
<action l ... HelpKey="MC.order.orderList.Help" ... />- If your page is neither of the preceding types, define the following JavaScript function in your page:
function getHelp() { return "MC.myPage.Help "; }
Related concepts
Related reference