Next Previous Up Top Contents Index

WebMaker User Guide

12.9.1 Generated table of contents

We define a generated table of contents as one generated by WebMaker, not FrameMaker.

To trigger a generated table of contents, the FrameMaker document must include a single use of a FrameMaker paragraph tag, such as: WWW-TOC. The node type dedicated for this use needs to be specified because:

For example, suppose we need to create a generated full table of contents for a FrameMaker document that has four levels of headings, and we would like to be able to point to it at will. We need:

This is achieved by the following excerpts of WML:

NODE ExternalTOC 
{ 
  TITLE concatenate(maintitle()," - TOC") 
  HEADER { ... } 
  FOOTER { write(*,toc(4,global)) } 
           ...  } 
}

PARAGRAPH "TOCChapter" TYPE Heading 
{  NEWNODE ExternalTOC 
   FILENAMEKEY exttoc 
   LEVEL 1 
   ACTIONS { write(*,heading(1,text())); 
             write(*,hrule());  } 
}

The generated table of contents may then be pointed to by the use of the function filename(node) by supplying the specified FILENAMEKEY as parameter, such as:

...
write(*,button("[Contents]",filename(exttoc)));
...