Use this method to create links between modules when you are not sure whether the module containing the link target will be present at runtime or not. It creates a link that points to both the main target topic and to an alternative topic in the master help module. If the main target is present the user can select it from the dialog. If it is not present the alternative topic is displayed automatically.
This method only works in HTML Help (the A-link macro is translated automatically when you publish to HTML Help). Use it for creating 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 at runtime. This can happen when you use runtime merging and choose not to include one or more of the help files in your distribution.
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. This can be any topic including a topic in the Topic Files section that does not have a TOC entry.
2.Select this alternative topic in the Project Explorer, display its tab and enter a unique A-keyword in its A-Keywords: field.
Step 2: Prepare the target topic in the child project
1.Select the topic you want to link to in the child project.
2.Display the topic's tab and enter the same A-keyword as above in its A-Keywords: field.
This A-keyword should only be used in these two topics. If you use it in any other topics in any module these topics will also be displayed in the link list.
Step 3: Create the link
1.Open the module in which you want to create the link. This can be a master module or another child module.
2.Select the topic where you want to create the link and open the Insert Hyperlink dialog.
3.Select the Script Link option on the left, then select Winhelp macro.
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)
|