Use this method to create links between the help files of modular help systems if there is a possibility that the help files containing the target topics may not be present when the help is viewed. This can happen when you use runtime merging and choose not to include one or more of the help files in your distribution. It can also happen if you are using conditional output to exclude modules from publish-time merged HTML Help and Winhelp projects.
This technique works both in HTML Help and the obsolete Winhelp forma but not in any other formats. Please study Working with Modular Help Systems before trying to use this method!
Step 1: Prepare the alternative topic in the master project
The alternative topic should be in the master project because this is the only help file that is always present in a runtime-merged modular help system.
1.Open the master help project and choose or create the alternative topic that you want the user to be able to view when the other help file module containing the target topic is not available.
2.Select this alternative topic, select the tab and enter a unique A-keyword in the A-Keywords: field. The A-Keyword must be unique. It should not be used anywhere else in your projects! If it is, all the topics where it is used will be displayed when the A-Link hyperlink is clicked.
Step 2: Prepare the target topic in the child project
1.Open the child project and select the topic you want to link to.
2.Select the tab and enter the same unique A-keyword as above in the A-Keywords: field.
Step 3: Create the link
1.Open the project module in which you want to create the link. This can be a master module or another child module.
2.Select Insert > Link in to create a hyperlink.
3.Select the Script Link tab in the Insert Hyperlink dialog, then select Winhelp macro as the type of hyperlink.
4.Enter Alink() in the Script: field and type the keyword between the parentheses. If your keyword is "about widgets" the dialog would look like this:
If the target help file is not present when the user clicks on the link the alternative topic will be displayed automatically. If the target topic is present a dialog will be displayed in which the user can select either the target topic or the alternative topic.
This is just a very simple example to show you how this solution works in principle. In practice you can also make more complex solutions, using more alternative topics and more keywords. If you use multiple keywords remember to separate them with semicolons, like this:
Alink(about widgets;troubleshooting;widget solutions)
Note that when you are working in HTML Help you can only enter keywords as the argument for the Winhelp macro. You cannot enter the other parameters for the Winhelp A-Link macro because they are not translated into HTML Help code!
|