Linking to a specific topic in our Web Help system
2 years ago
We are trying to test the context sensitive capabilities of the Web Help system that we have created with HelpSmith.
Our developers would like to create links to specific topics by using the topic's textual ID instead of the Context number. However, no matter what identifier they are using, the Web Help display the first topic only.
Do you you have any documentation that explains how we can create links to Web Help topics from our website?
You can link to a specific topic in a Web Help system by the topic's HTML filename, Context ID, or textual ID.
For more details, you can visit the topic below:
Please note that for a Web Help system to work properly, it should be accessed from a web server (i.e. via the "http://" protocol).
In case you open the Web Help's "index.htm" file on the local computer manually (i.e. via the "file://" protocol), the context-sensitive help and other functionality may not work properly because modern web browsers apply security restrictions to local HTML files.
When you compile a Web Help system, HelpSmith displays it in the web browser via its built-in web server (by using the address like: "http://127.0.0.1:80/...").
In this case, linking to a specific topic should work correctly, so it is possible to test such links on the local computer as well.
That was very helpful, thanks!
We have another question:
What is the difference between the Context, ID, and how the topic's filename is generated?
It seems like if we change the topic's ID value (for example, IDH_TOPIC10), the filename (idh-topic10.htm) changes as well?
A topic has two identifiers that you can view/edit via the Topic Properties dialog. Context is a numeric identifier (e.g. 20), and ID is a textual identifier (e.g. IDH_Topic20, My_Topic, etc.).
For textual IDs, it is recommended to assign readable names depending on what the topic describes. For example, you can see the ID values used by the topics in the sample help projects.
Regarding topic filenames:
When you compile a Web Help system, HelpSmith uses the textual IDs to generate the filenames of the topics.
If necessary, in HelpSmith, you can change the HTML files extension at:
Project|Project Options|HTML Export
Also, when generating the filenames from IDs, HelpSmith can replace the "_" char with the "-" char. This option is enabled by default at:
Project|Project Options|Web Help|SEO friendly topic file names
For example, while the ID value of a topic can be "My_Topic", the filename generated for that topic can be "my-topic.htm".
Linking to a specific topic in a Web Help system:
For linking to a specific topic, you can use any method including linking by the filename, by numeric Context value, or by textual ID.
You can find the syntax that you should use for your links depending on the method used at: https://www.helpsmith.com/webhelp/topics/context-sensitive-help-web-help.htm
We prefer to link to the topics in the HelpSmith's Help system by linking to the filenames of the topics (as you can see by the link above).
However, if you use this method, you should not change any settings that influence the generation of the filenames (to avoid broken links on your website, etc.).
Thanks again for your help!