Linking Topics by Title or Id
In addition to explicit links that are referenced in the Table of Contents, you can also access topics by Title and Topic Id using query string syntax.
Title Navigation
You can access by title using the full topic name.
Example:
https://markdownmonster.west-wind.com/?topic=Embedding Links
Note that it's not necessary to encode topic names in the Url so you can use spaces and special characters other than
&(replace with&)
Topic Id Navigation
If you know the Topic Id which is unique to a specific topic you can also use that for navigation. To navigate to the same link above using the topic Id:
https://markdownmonster.west-wind.com/?topic=_4xs10gaui
Topic Ids can be useful because it never changes. Titles can change, but topic Ids generally won't.
First Load may not Work
Depending on the size of the table of contents and the speed of your connection, on an initial load the specified query string topic may not load. This is due to the fact that the topic is retrieved from the TOC that is loaded dynamically and may not have completed loading.
Refreshing the page or simply loading again even in a new session usually fixes this, as the subsequent load caches the loaded TOC content.
Help Builder Compatibility
If you're running an old Html Help Builder Web site on Windows with IIS, and you have links that point to topic ids like this:
https://site.com/_idas23asdd.html
You can add an IIS Rewrite Module rule that redirects the old links to a new Url using the above topic id syntax.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<!-- Html Help Builder routing -->
<rule name="Extract Topic ID" stopProcessing="true">
<match url="(_.*).html?$" />
<action type="Redirect" url="https://{HTTP_HOST}/?topic={R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
For this to work, make sure the IIS Rewrite Module is installed in IIS.
Note that you might have to adjust the page for any subfolder sites. For example for a subfolder /docs/ as the doc root:
url="https://{HTTP_HOST}/docs/?topic={R:1}"
