Conditional Compilation / Processing Dead Links |
Send comments on this topic |
When you exclude a help topic from a compilation, the hyperlinks that link to that topic from other topics become invalid (or "dead"). HelpSmith offers different ways to prevent invalid hyperlinks, which can be used in different situations.
Using Conditional Text to Delete or Replace Dead Hyperlinks
You can include a hyperlink linking to a topic into a conditional text block with the same build options as defined for the linked topic itself. So when the topic is excluded from a compilation, the hyperlink will also be excluded. Using the Else element in the conditional text block allows you to type alternative content that will replace the hyperlink when it is excluded.
Automatic Removal of Dead Hyperlinks
By default, HelpSmith does not process hyperlinks that become invalid when the linked topic is excluded from a compilation.
But you can activate automatic removal of invalid hyperlinks:
1.On the Project tab, in the Project group, click Project Options.
2.In the dialog, in the left sidebar, under General, click Build Tags.
3.In the Dead Links box, select Remove Dead Links.
4.Click OK.
When the Remove Dead Links mode is selected, HelpSmith will convert all dead hyperlinks into regular text.
Remark: Please note that there are situations when the program cannot define a proper text style for former hyperlinks. Therefore, using the first method to prevent dead hyperlinks is more reliable.
Forced Inclusion of Linked Help Topics
You can also force inclusion of linked help topics into the compiled help system:
1.On the Project tab, in the Project group, click Project Options.
2.In the dialog, in the left sidebar, under General, click Build Tags.
3.In the Dead Links box, select Include Linked Topics.
4.Click OK.
When the Include Linked Topics mode is selected, HelpSmith will force inclusion of the linked help topics into the compiled help system, so the hyperlinks will work as usually.
The topics that are included in the result of using this option and existing hyperlinks linking to them, will not be available in the Table of Contents, or Index of the compiled help system. However, such topics will be available in search results when searching for a relevant keyword.
Remark: This option works in HTML Help (CHM), Web Help, ePub eBook, and Markdown formats only.
Related Links
•Conditional Compilation: Overview
•Including/Excluding Help Topics
•Compiling Help Project with Build Tags
Copyright © 2007-2024 HelpSmith.com