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. Context numbers 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 in the Topic Options tab on the left of the main editor window. For more background information see IDs, Context Numbers and Keywords in the Reference section.
Key Information
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 Topic Options tab on the left of the main editor window 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:
Context numbers are stored as an unsigned 4-byte integer, which means you can enter values between 1 and 4294967295. This is nearly 4.3 billion, so it should provide you with a reasonable number of context numbers for most normal-sized applications.
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
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 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 and enter a context number in the field in the dialog.
•To apply context numbers to new anchors automatically activate the anchors option in |
Help context numbers are normally only relevant in HTML Help CHM files. However, Help+Manual will also export them to WebHelp where you can use them to access topics and anchors in topics with references in URLs.
You would not want to use this for new WebHelp, but if you already have context numbers you are using for calls to your CHM files your programmers can also reference the same numbers in WebHelp. See this topic for details.
|
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 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
WE_Editor_About
WE_Editor_Controls
WE_Editor_Using
|
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
WE_Editor_About
WE_Editor_Controls
WE_Editor_Using
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 .
|
See also:
IDs, Context Numbers and Keywords (Reference)