Share via


Collection-Level .HxT File

The collection-level .HxT file defines the structure of the table of contents (TOC) for your Help collection.

The PluginStyle Attribute

Using the PluginStyle attribute, you can choose either the hierarchical or flat style for the appearance of your Help collection’s TOC. The chosen style depends on your documentation and how you want it to appear in the integrated TOC.

Hierarchical Plug-in

Hierarchical is the default style for a plug-in Help collection. This plug-in style creates a top-level node for the plug-in and displays the TOC structure defined in your collection-level .HxT file underneath this node.

The default top-level TOC node title is <parent namespace>/<child namespace>. To change the default title, add a PluginTitle attribute to the <HelpTOC> element in the collection-level .HxT file, as follows:

<?xml version="1.0" encoding="utf-8" ?> 
<!DOCTYPE HelpTOC>
<HelpTOC 
   DTDVersion="1.0" 
   PluginStyle="Hierarchical" 
   PluginTitle="My Help Collection"
>
   <HelpTOCNode NodeType="TOC" Url="MyHelpProject"/>
</HelpTOC>

Flat Plug-in

The flat plug-in style creates a TOC in which all top-level TOC nodes are peer nodes. (For example, MSDN for Visual Studio uses the flat plug-in style.)

To change the plug-in style to flat, use the "Flat" PluginStyle attribute value in the <HelpTOC> element of the collection-level .HxT file:

<?xml version="1.0" encoding="utf-8" ?> 
<!DOCTYPE HelpTOC>
<HelpTOC 
   DTDVersion="1.0" 
   PluginStyle="Flat"
>
   <HelpTOCNode NodeType="TOC" Url="MyHelpProject"/>
</HelpTOC>

Collection TOC Nodes

The collection-level .HxT file has one <HelpTOCNode> element for each node in the Help collection's TOC. In addition, the <HelpTOCNode> element can point to an .HxS file’s entire TOC or to a specific topic within an .HxS file.

TOC NodeType

The following example shows an .HxT file for a Help collection with two .HxS files (HelpCol_A and HelpCol_B). By setting the NodeType attribute of each <HelpTOCNode> element to "TOC", the entire table of contents in the .HxS file is displayed at that position in the collection’s TOC.

<?xml version="1.0"?>
<!DOCTYPE HelpTOC>
<HelpTOC 
   DTDVersion="1.0" 
   Id="HelpCol_TOC"
   LangId="1033"
   PluginStyle="Flat"
>
   <HelpTOCNode Id="IDA" NodeType="TOC" Url="HelpCol_A"/>
   <HelpTOCNode Id="IDB" NodeType="TOC" Url="HelpCol_B"/>
</HelpTOC>

Regular NodeType

The following example shows a collection-level .HxT that defines TOC nodes that link to specific topics within the collection’s .HxS files. By setting the NodeType attribute to "Regular" and the Url attribute to a URL in the form of "/<.HxS name>/<logical folder within .HxS file>/<topic>", you can create a node in the Help collection's TOC that displays a specific topic when clicked:

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE HelpTOC>
<HelpTOC 
   DTDVersion="1.0" 
   PluginStyle="Hierarchical" 
   PluginTitle="My Help Collection"
>
   <HelpTOCNode 
      NodeType="Regular" 
      Url="/project/html/gettingstarted.htm" 
      Title="Getting Started" 
   />
   <HelpTOCNode 
      NodeType="Regular" 
      Url="/project/html/roadmap.htm" 
      Title="Roadmap" 
   />
   <HelpTOCNode 
      NodeType="Regular" 
      Url="/project/html/movemethod.htm" 
      Title="Move Method" 
   />
</HelpTOC>

See Also

Other Resources

Collection-Level Files