[All Adaptavist Apps]

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
h1. Adding Table of Contents

*{excerpt}This tutorial describes how to add a table of contents to the menu bar...{excerpt}*

h2. Requirements

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

h2. Step 1 - Go in to Theme Configuration

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

!configure_theme_menu.gif|align=center!

h2. Step 2 - Editing the Menu

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

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

Which looks like:

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

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

h3. Step 3 - Make Sure it Works

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

!menu-toc.gif|align=center!

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

h2. Hints and Tips

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

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

Which results in:
{menubar}
{menu}Browse
  {submenu}By Headings
    {wikimenu}{toc}{wikimenu}
  {submenu}
{menu}
{menubar}


h2. 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.|
Scrollbar
no-csstrue

Adding Table of Contents

Excerpt

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":

Image Removed

Step 2 - Editing the Menu

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

No Format

* Contents {toc}

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:

Image Removed

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:

No Format

* Browse
** By Headings {toc}

Frequently Asked Questions

...

Q

...

Are there any other macros that create menus like this?

...

A

...