How to: Create Table of Contents Entries

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

This topic describes how to add information to the table of contents that appears in the Microsoft Dynamics AX Help viewer. You typically add a table of contents entry when you add documentation that creates a new Help topic. To update the Help viewer, you publish an XML file that contains the entries you want to add to the table of contents. The following steps describe how to create the XML file.

To create a TableOfContents.xml file

  1. Use a text or XML editor to create a new file.

  2. Use the text or XML editor to add the xml and tableOfContents elements to the file. The tableOfContents element requires that you add XML namespace information. The following XML example shows how to add the xml and tableOfContents elements.

    <?xml version="1.0" encoding="utf-8"?>
    <tableOfContents xmlns="https://schemas.microsoft.com/dynamicsHelp/2008/11" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">
    </tableOfContents>
  1. Add metadata properties that specify a document set, language, and publisher. The help service uses these properties to identify the entries that appear in the table of contents of the help viewer. The following table describes how to populate the properties:

    Property

    Required

    Description

    documentSet

    Yes

    Specify the ID of a document set. Typically, you set this property to UserDocumentation. The document set determines whether the entries appear in the table of contents for the application workspace, developer workspace, or both.

    Ms.locale

    Yes

    Specify the language of the table of contents entries. Use a language code to identify the language. For example, use EN-US for United States English. The ms.locale property enables the Help viewer to display localized content.

    publisher

    No

    Specify the ID of the publisher. Table of contents entries are grouped by publisher.

    The following XML example adds the metadata properties. Notice how the metadata properties are child elements of the tableOfContents element.

    <?xml version="1.0" encoding="utf-8"?>
    <tableOfContents xmlns="https://schemas.microsoft.com/dynamicsHelp/2008/11" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">
       <publisher>Contoso</publisher>
       <documentSet>UserDocumentation</documentSet>
       <ms.locale>EN-US</ms.locale>
    </tableOfContents>
  1. Add the entries XML element. The entries element follows the metadata properties. The following XML example adds the entries element.
    <publisher>Contoso</publisher>
    <documentSet>UserDocumentation</documentSet>
    <ms.locale>EN-US</ms.locale>
    <entries>
    </entries>
  1. Add an entry element for each topic that you want to add to the table of contents. The entry element must be a child element of the entries element that you added earlier. The following table describes how to populate the properties of an entry element.

    Property

    Required

    Description

    text

    Yes

    Specify the text that appears in the help viewer.

    Microsoft.Help.F1

    No

    Specify one or more topic IDs that are associated with the entry. When you click an entry in the table of contents, the help viewer uses these IDs to request the content elements associated with that entry.

    children

    No

    Specify a hierarchy in the table of contents. Use the children element when you want to add one or more entry elements that appear in the help viewer as child elements of the current entry. The children element is optional.

    The following XML example adds an entry element to the table of contents. Notice how this entry specifies the use of the default help topic.

    <entries>
       <entry>
          <text>Sample help topic</text>
          <Microsoft.Help.F1>DEFAULT_TOPIC</Microsoft.Help.F1>
       </entry>
    </entries>
  1. If you want the help viewer to display topics in a hierarchical structure, use the children element. The use of the children element is optional. Add the entries to the children element that you want to appear in the help viewer under the current entry. The following XML example uses children to add an entry.
    <entry>
       <text>Sample help topic</text>
       <Microsoft.Help.F1>DEFAULT_TOPIC</Microsoft.Help.F1>
       <children>
          <entry>
             <text>Child help topic</text>
             <Microsoft.Help.F1>DEFAULT_TOPIC</Microsoft.Help.F1>
          </entry>
       </children>
    </entry>
  1. Use the text or XML editor to save the file. The file must be named TableOfContents.xml.

    Note

    You use the TableofContents.xml file to publish the new entries to the Help server. For more information about how to publish table of contents entries, see How to: Publish Table of Contents Entries.

Example

The following XML shows the basic structure of the TableOfContents.xml file.

<?xml version="1.0" encoding="utf-8"?>
<tableOfContents xmlns="https://schemas.microsoft.com/dynamicsHelp/2008/11" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">
<publisher>Contoso</publisher>
<documentSet>UserDocumentation</documentSet>
<ms.locale>EN-US</ms.locale>
<entries>
   <entry>
      <text>Sample help topic</text>
      <Microsoft.Help.F1>DEFAULT_TOPIC</Microsoft.Help.F1>
      <children>
         <entry>
            <text>Child help topic</text>
            <Microsoft.Help.F1>DEFAULT_TOPIC</Microsoft.Help.F1>
         </entry>
      </children>
   </entry>
</entries>
</tableOfContents>

See also

Authoring Help Documents

How to: Publish Table of Contents Entries