Templates

C++ Boost


Overview
index.html
menu.html
Example

Overview

The tree control package provides two HTML templates which make it easy to write documentation using the tree control component.

index.html

<doc/tree/templates/index.html>

The template index.html is used to generate a library's homepage, or the homepage of a subsection of a large library. It looks like this:

    <html>
    <head>
    <title>{{library name}}</title>
    </head>
    <frameset cols='215,*'>
        <frame scrolling='auto' name='index' src='{{tree control page}}'>
        <frame scrolling='auto' name='content' src='{{initial content page}}'>
    </frameset>
    </html>

To use the template, replace {{library name}} with the name of the library being documented, {{initial content page}} with the url of the HTML document which should initially be displayed in the content frame and {{tree control page}} with the url of the HTML document containing the definition of the tree control. This later document can be generated from scratch or from the template menu.html.

menu.html

<doc/tree/templates/menu.html>

The template menu.html is used to generate an HTML page containing a tree control. When displayed it consists of the Boost logo, the library name, the caption 'Contents', a link which synchronizes the tree control and the tree control itself. See Example.

To use menu.html follow these steps:

  1. Replace all occurrences of {{boost root}} with a relative path to the Boost root directory.
  2. Replace {{library name}} with the name of the library to be documented.
  3. In the section labeled Create and Populate Tree Control, replace the sample code with code to construct a tree_control with nodes linking to the sections and subsections of the library's documentation. This can be done by modifying the sample code or by referring to the Tutorial or Reference.
  4. Uncomment the line
        //tree.dump_html = true;
    and display the page in a script-enabled browser. Copy the output from the browser window into the section of the template labeled Markup for Browsers with Scripting Disabled.
  5. Comment out the above line — you may need to use it again later when you update your documentation.

Example

The following website was constructed using the provided templates: <doc/tree/example/example.html>.


Revised 22 July, 2004

© Copyright Jonathan D. Turkanis, 2004

Use, modification, and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)