Navigation:  Basic Working Procedures > Managing Topics in the TOC >

Assigning topic IDs

Print this Topic Previous pageReturn to chapter overviewNext page

In this topic:

The topic ID (look in the Topic Options tab of any topic to see its ID) is the unique alphanumeric identifier of a topic. It must be unique because it is used to reference the topic, both by the help viewer and by programmers accessing the topic from applications. All the internal links you create in your project refer to topics by their IDs, for example.

For more background information see IDs, Context Numbers and Keywords in the Reference section.

Avoid topic IDs with 31 characters:

Because of the way long topic names are handled you must avoid using topic IDs with 31 characters or multiples of 31 characters (62, 93 etc). If you use them you may experience errors. See here for details.

How to assign topic IDs:

Topic IDs are assigned automatically when you create a new topic but you can also change them at any time. See Changing topic IDs and context numbers for details.

Topic IDs are generated automatically on the basis of the topic caption when you create a new topic. As soon as you start typing the topic caption (1) the same text is also generated in the Topic ID  field (2), replacing spaces with underline characters and leaving out or converting any characters not allowed in IDs.

 

You can edit the topic ID in (2) before clicking on to create the topic. (See the note on special characters below.) You can also change the topic ID later at any time.)

 

Don't use special characters in topic IDs!

It is good procedure to only use a..z, A..Z, 0..9, _ and (in some special cases) $ in topic IDs. Help & Manual will not allow you to enter characters that always cause problems, like spaces and #, but to be on the safe side you should also avoid "allowed" special characters like brackets and so on. They may work, but remember that you use them entirely at your own risk!

 

Using descriptive Topic IDs:

It's advisable to give topics descriptive IDs that make sense to you as well as your program, as this makes your help projects easier to manage. For example, the Hyperlink Link dialog and the Find Topic function both display only the topic IDs in alphabetical lists, not the topic titles, and descriptive names make it a lot easier to know what you are linking to and looking for in these lists!

Using hierarchical topic IDs:

The "hierarchical" topic ID naming scheme can make managing your help projects much easier, and since the introduction of IDs with up to 256 characters in Help & Manual 4 it is also very easy to use.

What is a "hierarchical" ID? 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 would look something like this:

WE_Editor
WE_Editor_About
WE_Editor_Controls
WE_Editor_Using

If you think about it for a moment the advantage of doing this should be immediately obvious. It keeps the topics of your chapters together in all the alphabetical lists of topic IDs, which makes these lists much easier to use and manage. Help & Manual 4 introduces IDs with up to 256 characters, so writing descriptive hierarchical IDs is easy and highly recommended.

Using a unique project prefix:

You may be wondering why the examples above have the prefix WE_. This is a unique prefix that identifies the project and it is very useful if you ever create modular projects. It makes sure that you will never have problems and errors caused by duplicate IDs when you combine your modules and link between them, and it also provides an additional reminder for you by identifying your targets when you are creating links across modules.

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 Project > Project Properties > Common Properties > Topic IDs and Help Context.

See also:

IDs, Context Numbers and Keywords (Reference)

Assigning help context numbers

Changing topic IDs and context numbers

 


Page url: http://www.helpandmanual.com/help/index.html?hm_working_toc_assignids.htm