The topic ID is the unique alphanumeric identifier of a topic. It must be unique because it is used to reference the topic for hyperlinks and by programmers accessing the topic from applications.
The help context number is an additional unique topic identifier. Help context numbers are only relevant in HTML Help CHM files. They are optional for making calls to normal topics and required for making calls to field-level popups displayed directly in applications. Most programmers now use normal IDs for calls to topics because they are human-readable, which reduces errors.
You can view and edit topic IDs and help context numbers the Topic Options tab below the main editor window. For more background information see IDs, Context Numbers and Keywords in the Reference section.
Accented characters, special characters and high-ASCII characters are not permitted in IDs. For maximum compatibility with all output formats only use a..z, A..Z, 0..9 and _ in topic IDs. Topic IDs are never seen by the user. |
Topic IDs are assigned automatically when you create a new topic but you can also edit them at any time. The topic ID is an alphanumeric string that is the address of the topic in the project. It is also used to generate the HTML filename of the topic in all HTML-based output formats. •When you create a new topic the ID is generated on the basis of the topic caption. You can accept the program's suggestion or edit it. Use descriptive topic IDs, it will make your project much easier to manage. IDs can be up to 255 characters long. (Automatically-generated topic IDs are restricted to 30 characters to prevent accidental creation of excessively long IDs.) •To edit a topic's ID just select the tab under the editor and edit the ID in the Topic ID: field. All links and references within your project are updated automatically when you edit the ID. However, you must update any references to the ID from your applications or other help files yourself. You must also update any references in your own manually-written code in HTML templates etc. |
Help context numbers are only relevant in HTML Help CHM files. They are optional for making calls to normal topics and required for making calls to field-level popups displayed directly in applications. Most programmers now use normal IDs for calls to topics because they are human-readable, which reduces errors. Value range: Assigning and editing context numbers manually:•Select the tab and type a help context number in the Help Context: field. Edit context numbers in the same way. •You can assign multiple context numbers to a single topic. To do this just separate the context numbers by commas (no spaces required). You can then reference the same topic with different context numbers. Assigning context numbers automatically:•Help & Manual can assign context numbers to new topics automatically. Activate this function for your project in the Project Explorer in Configuration > Common Properties > Miscellaneous. •If you are working on modular projects make sure that you assign number ranges that will not overlap. Remember, all context numbers must be unique! Assigning context numbers to entire projects:•Select the Context Tool in Project > Tools and follow the instructions displayed. See The Help Context Tool for details. |
You can also assign help context numbers to anchors. This enables programmers to make calls to a specific position within a topic. •To apply a context number to a new anchor just select Write > Insert Object > •To apply context numbers to new anchors automatically activate the anchors option in Configuration > Common Properties > Miscellaneous. |
It's advisable to give topics descriptive IDs, this will make your projects much easier to manage. In addition to this, using a "hierarchical" topic ID naming scheme will keep topics belonging to the same chapters together in lists of topic IDs. Suppose you have a project called Widget Editor with a chapter called The Editor that contains the topics About the Editor, Editor Controls and Using the Editor. Descriptive, hierarchical IDs for these topics could look something like this: WE_Editor |
Using a unique topic ID prefix for each project prevents ID conflicts in modular projects. This allows you to use IDs like "introduction" in all your projects without creating duplicates. If there is even a small chance that you will ever want to combine multiple projects to a single large project you should use ID prefixes. It is best to use a 2 or 3 character project identification prefix separated from the rest of the ID by an underscore, for example: WE_Editor You can configure Help & Manual to generate a prefix of your choice automatically for every new topic you create. Just enter the prefix you want to use in the Project Explorer in Configuration > Common Properties > Miscellaneous. |
See also:
IDs, Context Numbers and Keywords (Reference)