HeaderDoc Unfettered: Creating a TOC Template File

## Creating a TOC Template File

TOC template files are basically ordinary HTML files. They can contain any HTML content. In addition to HTML content, they can also contain conditional HTML content—that is, content that is only included if certain conditions are met. Finally, they can include various lists.

The template support is particularly powerful when combined with support for frameworks (which, for HeaderDoc's purposes, is essentially a loose grouping of related documentation stored in the same output directory).

Below are the special tags that indicate conditional or list content:

$$title@@
  Inserts “Foo Documentation” where Foo is the framework name.
$$framework@@
  Inserts the framework name.
$$frameworkdiscussion@@
  Inserts the framework discussion
$$frameworkabstract@@
  Inserts the framework abstract
$$headersection@@
  Start of conditional block for headers. If there are no headers listed, content prior to the closing conditional block tag will not appear.
$$/headersection@@
  End of conditional block for headers.
$$headerlist@@
  A list of all headers in the output directory.
$$classsection@@
  Start of conditional block for classes. If there are no classes listed, content prior to the closing conditional block tag will not appear.
$$/classsection@@
  End of conditional block for classes.
$$classlist@@
  A list of all classes in the output directory.
$$categorysection@@
  Start of conditional block for categories. If there are no categories listed, content prior to the closing conditional block tag will not appear.
$$/categorysection@@
  End of conditional block for categories.
$$categorylist@@
  A list of all categories in the output directory.
$$protocolsection@@
  Start of conditional block for protocols. If there are no protocols listed, content prior to the closing conditional block tag will not appear.
$$/protocolsection@@
  End of conditional block for protocols.
$$protocollist@@
  A list of all protocols in the output directory.
$$datasection@@
  Start of conditional block for data (globals and constants). If there are no data elements listed, content prior to the closing conditional block tag will not appear.
$$/datasection@@
  End of conditional block for data (globals and constants).
$$datalist@@
  A list of all data elements in the output directory.
$$typesection@@
  Start of conditional block for types. If there are no types listed, content prior to the closing conditional block tag will not appear.
$$/typesection@@
  End of conditional block for types.
$$typelist@@
  A list of all types in the output directory.
$$functionsection@@
  Start of conditional block for functions/methods. If there are no functions/methods listed, content prior to the closing conditional block tag will not appear.
$$/functionsection@@
  End of conditional block for functions/methods.
$$functionlist@@
  A list of all functions/methods in the output directory.

List tags default to a raw list (single column) with no border. However, you can change the number of columns, the table width, and border quite easily. For example:

        $$functionlist cols=3 order=down atts=border=”0” cellpadding=”1” cellspacing=”0” width=”420”@@
| `
`

specifies that the table will be three columns, listed down the first column, then down the next column, and so on. It also specifies that the additional attributes `border`, `cellpadding`, `cellspacing`, and `width` will be inserted into the table tag automatically. Note that the `atts` parameter must be the last parameter listed.

© 1999, 2004 Apple Computer, Inc. All Rights Reserved. (Last updated: 2004-05-27)