Linking to other projects and help files

Navigation:  Basic Working Procedures > Links, Anchors, Macros, Scripts and HTML >

Linking to other projects and help files

Previous pageReturn to chapter overviewNext page

Show/Hide Hidden Text

By default the target ID list in the Hyperlink dialog displays the IDs of the current project, but you can also link to topics in other projects and in other help files. When you distribute your help these files must be present in the same directory as the help file containing the link.

Click to expand/collapseHow to link to an external project or help file

1.Follow the basic instructions for inserting a normal topic link.

2.In the Hyperlink dialog click on the BTN_Browse browse button in the Help File: field and choose the project or help file containing the topic you want to link to.

DLG_Hyperlink_LinkExfile+

3.If you choose a Help & Manual project (.hmxz or .hmxp)  the topic IDs of the target project or file will be displayed in the Topic ID list. Choose the topic (and anchor if applicable) you want to link to and click on OK.

Arrow_rIf you choose an HTML Help (.chm) file you will see the topic filenames with the .htm extensions. These are the same  as the IDs in your project, just select in the same way. You won't see the available anchors in the drop-down list when you select a CHM file as the target, but if you know the anchor ID you can type it in in the anchor field, which is fully editable.

Links between modular projects:

When you are linking between modular projects you may need to think about what will happen in situations when the project you are linking to is not present when the user clicks on the link. See Modular Projects for more information on this and solutions.

Click to expand/collapseLinking to topics in other Webhelp (HTML) projects

The situation is a little different when you want to create links between different WebHelp projects, which are by definition stored in different directories. These are effectively just groups of HTML pages, like any other set of HTML pages on a website. Topic links will not work here because this is really a website, not a help project – you have to use Internet links instead.

1.Follow the instructions for inserting an Internet link and choose the Links to an Internet address option.

2.Enter the URL of the page in the other project in the Address: field. You can enter either the absolute address or the relative address (the relative address will depend on the relative positions of the directories on your website, of course):

Absolute address:

http://www.yourdomain.com/subdirectory/index.html?topicname.htm#anchorname

Relative address:

../subdirectory/index.html?topicname.htm#anchorname

Here index.html is the index file of your project (this is the default, you can change it in the Publish dialog when you publish), topicname.htm is the name of the topic (topic ID plus .htm) and anchorname (optional) is an anchor in the topic you want to link to.

Choosing the window to open the link in:

If you want to display the TOC of the target project in the current browser window select the Top Frame option in the Target window: field. If you don't  do this the topic will overwrite the TOC in a single browser window. Selecting New Window opens the topic in a new browser window together with its TOC.

Direct links to topic files:

It is possible to link directly to the topic filename, for example with:

../subdirectory/topicname.htm

The entire help with the TOC wills still be displayed automatically when you do this. However, the Back and Next history buttons in the user's browser will not work properly so it is better to use the full syntax  including the index.html index file.

See also:

Working with Modular Help Systems