Using the Table of Contents Gadget

posted Aug 19, 2009, 7:02 AM by Brian Johnson   [ updated Aug 19, 2009, 12:20 PM ]

While it is generally considered good practice to break the contents of a lengthy topic into multiple pages, there are times when keeping it all together on a single page makes the most sense.  For example, a list of FAQ's is best kept together and not broken up across multiple pages..  (As an example, see the FAQ list on this site.)

In those instances where you wind up keeping your content grouped together on a single page, you'll likely need a way to break it up into smaller chunks or sections that can be easily recognized and quickly accessed by your site's visitors.  One way to achieve this is by making use of the Google Sites Table of Contents gadget, which can be found under the Insert menu when you are actively editing a page.

What is the Table of Contents Gadget?

The Table of Contents gadget is a dynamic object that looks for any text in your page that has been formatted as a Heading (H2), Sub-heading (H3) or Minor heading (H4).  When it finds text that matches this requirement, the gadget automatically adds it to a hierarchical outline containing all headings on the page.  At the same time, the gadget creates an intra-page link that takes visitors directly to the specified section of the page.

How do I use the Table of Contents Gadget?

Adding the Gadget

The Table of Contents gadget can be added to your page by selecting Insert >> Table of Contents.  Once selected, you will have the following options:
  • Width
  • Show Levels - The "Show Levels" option enables you to define how detailed your Table of Contents is.  The default value is "All", and you can specify anything from 1 - 5 levels.

Populating the Gadget

In order to populate the gadget with links to the various sections of your page, you'll need to add section headings and format them according to how you want them to appear in the gadget.  To format your headings, you have three options to choose from.  Each of these options can be found under the Format menu in the edit toolbar.
  • Heading (H2)
  • Sub-heading (H3)
  • Minor Heading (H4)

Using this page as an example, I've added the following section headings and formatted as indicated:
  • What is the Table of Contents Gadget?  (Sub-heading (H3))
  • How do I use the Table of Contents Gadget?  (Sub-heading (H3))
  • Adding the Gadget  (Minor heading (H4)
  • Populating the Gadget  (Minor heading (H4))
When paired with the Table of Contents gadget, the above headings provide the following result:

See it in Action!