Tools: HeaderDoc Unfettered: Using Multiple Landing Page Templates

## Using Multiple Landing Page Templates

HeaderDoc 8 is not limited to a single landing page template. You can generate multiple landing pages with different content if desired. To do this, you might add a line in your config file like this:

    TOCTemplateFile => toctemplate.html functions.tmpl
| `
`

Next, create a pair of template files called `toctemplate.html` and `functions.tmpl`. In the file `toctemplate.html`, you can link to the functions index like this:

    <A href="$$frameworkdir@@-functions.html">Functions Index</A><p>
| `
`

In the functions template, you can link to the main TOC like this:

    <A href="$$tocname@@">Headers Index</A><p>
| `
`

When you run gatherHeaderDoc, you will now get two HTML landing pages, one for each template.

The first template file, `toctemplate.html`, is treated as the “main” template page. Its contents are output in the location specified by the `masterTOCName` variable in the config file (`masterTOC.html` by default).

The second template file, `functions.tmpl`, results in a second HTML landing page whose name is derived from the directory name of the framework, followed by a dash, followed by the template filename (without any “`.html`” or “`.tmpl`” extensions), followed by “`.html`”.

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