Automatic Table of Contents

One benefit of using structures is that Tiki can automatically include a table of contents for the structure (for example, an entire book including all chapters) or a single sub-structure (for example, only the sections within a specific chapter). This beginner's guide uses the structure's table of contents on several different pages.

Use the {toc} plugin on any wiki page in a structure to automatically include the content listing for that page and all pages "deeper" in the structure. If you use it on the home page of a structure, you get the whole book (or structure). If you use it further down, just that section and its subsections below are shown.

  • The main contents page includes the table of contents for the entire book.
  • Each major section (such as Getting Started) includes a table of contents only for that specific section.

 Note

This plugin is similar to the {maketoc} that will generate a table of contents for a single wiki page.


There are parameters that you can use with the {toc} plugin to customize how Tiki generates the table of contents. Some of the most common are:

  • shownum=y: Tiki will automatically number each heading (sometimes called "legal" or "military" style headings).
  • maxdepth=#: Use a number (#) to indicate the maximum "depth" (that is, how many subheading ) to include in the table of contents. The default is 0 which will show all subheadings.

An example of the {toc} with these parameters would be:

{toc maxdepth=2 shownum=y}

 Tip

Refer to the Tiki Documentation for complete details.


As you add or change pages in the structure, Tiki will automatically update the table of contents for you! Everything will always be up-to-date.
TOC sample

<HR>

Copyright

This guide is based on content originally published by KeyContent.org.

This guide is Copyright (C) 2007-2013, 2019 by Rick Sapir and others under a Creative Commons Attribution-Share Alike 4.0 License. Some rights reserved.

Essentially, you are are free:

Image

to Share — to copy, distribute and transmit the work
Image

to Remix — to adapt the work


Under the following conditions:

Image
Attribution. You must attribute the work to me, as the original licencor, but not in any way that suggests that I endorse you or your use of the work.
Fair attribution includes a return link to http://tikiforsmarties.com (for online use) and mention of primary author (Rick Sapir) and original publisher (KeyContent.org).
Image

Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license.


Please read http://creativecommons.org/licenses/by-sa/3.0/legalcode for the full license.

Tiki®, TikiWiki® and the Tiki logo are registered trademarks of the Tiki Software Community Association, used with permission.