BuildTOCFromFile

Top  Previous  Next

Builds a table of contents for the compiled HTML project, using information from a HTML file.

 

Syntax:

procedure BuildTOCFromFile(FileName: string);

 

Description:

FileName is the HTML file containing the structure of the topics.

 

When building a compiled HTML table of contents file, you can use a HTML file that lists down the topics to build the compiled HTML project's table of contents.  For example, we have the following HTML contents file:

 

scripting_tchmtocfile_buildtoc01

 

We can use BuildTOCFromFile to build the compiled help's table of contents file.

 

scripting_tchmtocfile_buildtoc02

 

To use this method, there are some rules you need to follow.

 

Every list tag (<UL> or <OL>) and its closing tag (</UL> or </OL>) must start on a new line.

Every list item (<LI>) must start on a new line.

 

scripting_tchmtocfile_buildtoc03

 

DB Doc can then parse each line in the file, and for each list tag it finds, it starts a new list.  For each list item it finds, it adds that item to the list.  For each closing list tag that it finds, it ends the list.