The @tofc file

Updated Jun 05, 2013

The @tofc template file is processed by PHP and will generate the content for the table of contents file that points to the article files.

An example

Here is the @tofc.html for the Neutral template that ships with ScreenSteps. As you can see, it is a mixture of HTML and PHP (the PHP code is highlighted).

  • PHP is used to print the manual title.
  • The manual title is added to the document. This is the title the user sees on the browser page.
  • The table of contents is printed out using a function from helpers.php.

Which PHP objects are available to the @tofc file?

The $manual object is available to the @tofc file. Note that the articles array contains an array of $article objects as defined here. This means that you could create one monolithic file that contains an entire manual.

stdClass Object
(
    [chapters] => Array
        (
            [0] => stdClass Object
                (
                    [id] => An integer.
                    [title] => The chapter title.
                    [draft] => 1 or 0.
                    [articles] => Array
                        (
                            [0] = stdClass Object
                                (
                                    An article object
                                )
                        )
                )
        )
)

0 Comment

Add your comment

E-Mail me when someone replies to this comment
Previous Article The @article file
Next Article Sample templates for download

Still Need Help?

Contact Us