|This topic contains information about Microsoft Help Viewer, the help system for Visual Studio 2010 onwards. Microsoft Help Viewer can only be used to create help materials for integration with the Visual Studio help system and is not suitable for general purpose help systems.|
If you are deploying several different help systems as part of a single product you may wish to create a "Parent" project including a landing page or some other umbrella topics to provide convenient links for your users into the different help systems.
In Microsoft Help Viewer this is achieved by setting the TocParentId on the root topics in your child help systems to identify the common parent topic, and by using a specific Microsoft Help Viewer link format to link from the parent topics to topics in the child help systems.
Create the Parent project
The parent project contains the topics that you want to appear at the root of the Microsoft Help Viewer Table of Contents. Author the desired topics (more about linking between the parent and child projects below) and organize the Topics in the desired hierarchy using the Table of Contents editor.
Example Table of Contents layout in the parent project
In this example, the "Component Documentation" topic is the place where we want the topics from our child projects to appear. This can be any topic in the project, it's up to you which topic makes sense in your scenario.
In order to wire up the topics in the child projects to the parent project topics, we will need the Topic Id for the "Component Documentation" topic. We can get this by building the project, opening that Topic in the generated output, right clicking in the content and selecting "View Source" from the Help Viewer context menu. In the displayed source, you can find the topic Id in the "Microsoft.Help.Id" meta tag, e.g.
<meta name="Microsoft.Help.Id" content="53468d8a-a886-482e-8bce-90c32091a564" />
The topic is is the value in the "content" attribute - in this example "53468d8a-a886-482e-8bce-90c32091a564".
Configure the Child project
You now need to set the TocParentId property for each root topic in your child project(s) to the topic id of the topic in the parent project you want them to appear beneath in the Microsoft Help Viewer Table of Contents. You can set this property by selecting a Topic in the Project Explorer - the properties are then displayed in the Properties window.
If you have multiple topics that you are associating with the same TocParentId, you can set the TocOrdinal to a number that will be used to order the child topics.
Example Properties of a child topic to associate it with a topic in the parent project
|These properties will only appear if you configured your Build Profile to generate Microsoft Help Viewer output (on the Format page in the Build Profile editor).|
To keep the structure simple, and to avoid confusion in the Table of Contents, you may want to create a single root topic in your child help system, beneath which all the other topics are included. This will also simplify the configuration - you only need to set the TocParentId on that single root node.
Example Table of Contents layout in child project - using a single root node
Build both projects
You should now build both the projects and check in the Microsoft Help Viewer that the layout is as desired.
Table of Contents Layout in Help Viewer after both projects built
Linking between Parent and Child topics
You can create links between topics in the parent and child projects using the Topic Id.
|You can find the Topic Id for a given topic in the generated output by viewing the topic in Microsoft Help Viewer, right clicking in the content and selecting "View Source" from the Help Viewer context menu. In the displayed source, you can find the topic Id in the "content" attribute of the "Microsoft.Help.Id" meta tag.|
For example, you can create a link within a topic in the Parent project to a topic in a Child project. You can do this by typing a Microsoft Help Viewer specific link format in the Link Designer on the "Link to a web page or other internet url" page.
The link format is "ms-xhelp:///?method=page&id=[target_topic_id]" where [target_topic_id] is the topic id of the topic you wish to link to.
Example of a link to a topic in another Microsoft Help Viewer project
You can create links in this way from Parent -> Child or from Child -> Parent topics, or between different Child projects.
Download a sample Parent and Child project illustrating the technique for modular Microsoft Help Viewer help described in this topic: