[All Adaptavist Apps]

Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Adding Table of Contents

This tutorial describes how to add a table of contents to the menu bar...

Requirements

  • You must have sufficient privileges to edit the theme configuration (ie. be a Space Administrator)
  • You must have installed the [toc macro]

Step 1 - Go in to Theme Configuration

To do this, open the Edit menu and choose "Administration" then "Configure Theme":

Step 2 - Editing the Menu

To add the table of contents to the menu, add the following notation to your menu script:

{menu}Contents
  {wikimenu}{toc}{wikimenu}
{menu}

Which looks like:

Unknown macro: {menubar}
Unknown macro: {wikimenu}

That's it - simple, eh? Now save the theme configuration.

Step 3 - Make Sure it Works

Go to a normal page that has headings in and open the "Contents" menu:

As you can see, the menu is automatically generated from the text [headings] on the page.

Hints and Tips

You can place the [toc macro] under any menu item, including within sub-menus, for example:

{menu}Browse
  {submenu}By Headings
    {wikimenu}{toc}{wikimenu}
  {submenu}
{menu}

Which results in:

Unknown macro: {menubar}
Unknown macro: {menu}

Browse

Unknown macro: {submenu}

By Headings

Unknown macro: {wikimenu}

Frequently Asked Questions

Q

Are there any other macros that create menus like this?

A

Yes. Any macro that outputs an un-ordered bulleted list can be used. Some additional examples are given in our Automated Menu Creation tutorial.

  • No labels