About topic IDs and anchors

<< Click to Display Table of Contents >>

Navigation:  Reference > Project Structure & Templates > Topic IDs, Context Numbers and Keywords >

About topic IDs and anchors

Topic IDs:

Every topic in your help project has a unique alphanumeric topic ID, which you can view by clicking on the topic's tab above the editor pane. The topic ID is required because it is the unique identifier of each topic. Without the topic ID neither Help+Manual nor any electronic help system can find the topic.

Internally, Help+Manual uses the Topic IDs as the "addresses" for accessing topics within your help while you are working. In addition to this they are also used as the addresses for calls to topics in your help from applications, both on their own and in combination with help context numbers.

For information on making these calls to different help formats see the documentation of your programming language and the weblink tutorials for programmers available on the EC Software website.

Topic ID properties:

Maximum topic ID length:

Topic IDs can be up to 255 characters long.

Permitted characters:

Topic IDs are computer-readable addresses and are used as the file names of HTML topic files in HTML-based formats. Because of this, it is advisable to only use a..z, A..Z, 0..9, the underline character _ and the $ character in topic IDs.

This is actually stricter than necessary, but following this rule will ensure that you do not experience problems later, particularly in HTML-based publishing formats.

Forbidden characters:

Spaces and a number of special characters like (\  / : * ? # = + % ! @ [ ] > " | , < > & ') are explicitly forbidden in topic IDs and Help+Manual will display a warning message if you try to enter them.

Changing topic IDs:

Help+Manual allows you to edit topic IDs at any time. All internal links within your project are updated automatically when you do this. However, remember that changing topic IDs may break links from other projects and calls to the topics from applications.

For more information see Topic IDs and context numbers.

Topic IDs and HTML output files:

Topic IDs are used as the names of the HTML files generated for your topics by Help+Manual. In HTML-based output formats, links and calls to topics simply access the HTML files containing the topics.

This applies both for the visible files generated in WebHelp and the "internal" files used in HTML Help (here the HTML topic files are hidden inside the CHM help file, as though they were inside a directory).

In both cases the file name is created by converting the topic ID to all lower case characters and adding the file extension. In HTML Help this extension is always .htm. In WebHelp the default is also .htm but you can change this in Project Explorer > Configuration > Publishing Options > WebHelp > HTML Export Options.

Anchors:

Anchors are named "jump targets" that you can insert in your topics so that you can create links to specific locations within topics. They can be used both for hyperlinks within your help project and for calls to your help topics made from application programs.

Anchors are entered with the BTN_Insert_Anchor Anchor Tool in Write > Insert Object. The anchors stored in each topic are listed in the topic's tab in the Anchor: list. This list always contains at least one anchor called (Top of Page), which is the standard jump target for links without anchors.

For details see Anchors - jump targets.

Maximum anchor ID length:

Anchor IDs can be up to 256 characters long.

Permitted characters:

Spaces and a number of special characters like (\  / : * ? # = + % ! @ [ ] > " | , < > & ') are not permitted in anchor IDs and Help+Manual will display a warning message if you try to enter them. In addition to this, however, it is actually advisable only use a..z, A..Z, 0..9, the underline character _ and the $ character in anchor IDs.

This will ensure that you do not experience problems later, particularly in HTML-based publishing formats. Most browsers only support plain ASCII filenames and anchor names.

Where not supported:

Links to anchors are not supported in external windows in HTML Help.

Anchors with context numbers and keywords

Help+Manual allows you to assign both help context numbers and keywords to anchors. This makes it possible to make help calls to anchors from application programs and to create index entries that take the user to a specific location in a topic instead of to the top of the topic containing the keyword.

For details see Topic IDs and context numbers and Using keywords with anchors.

Syntax for browser links to anchors in topics

You can create ordinary links from web pages to anchors in your WebHelp topic pages. However, the syntax for these links is slightly different from the standard HTML syntax for linking to anchors:

index.html?topicname.htm#anchorname

See Anchors - jump targets for details.

See also:

Topic IDs and context numbers

Anchors - jump targets