NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A hierarchy of small wiki pages is easier to maintain than one large wiki page with sections. However, if you want to divide your content into sections within a single wiki page, a table of contents at the top is helpful to the reader. 

Scrollbar
iconsfalse

...

Panel
titleContents of this page

Table of Contents
minLevel

5

2

...

Avoid putting a

...

Click Add Page and then the link to Select a page template to start from. Select the table of contents template. When you save the page the table of contents is displayed. The page has a table of contents in the left column. You can edit the markup to meet your requirements.

Add a table of contents to an existing page

Add markup like the following at the place on the page where you want the table of contents to appear:

{panel:title=Contents}
{toc:minLevel=5}
{panel}

OR

{panel:title=Contents}
{toc:maxLevel=2}
{panel}

In the markup, enter either the minimum heading level to include in the table of contents, or the maximum number of levels to show in the table of contents.

Save the text to see the table of contents; the preview does not show it until the page has been saved.

You may also copy the markup on the page with minimal markup for a table of contents. This page provides markup for a table of contents in the left column.

...

First heading at second level

...

Some level two text to demonstrate the table of contents.

...

Second heading at second level

...

More level two text to demonstrate the table of contents.

Table of Contents macro on a page that is to be reused on another page via the Include Page macro, because the links will not work on the page where the Table of Contents macro is included. 

Create a new page with a table of contents

  1. Open the wiki page that will be the parent page of the new page. 
  2. Click the Create Content icon in the upper right corner of the page. Select the New NCI Wiki Page template. Click Create. The editing window opens. The page already has two sample headings with sample text, and a Table of Contents macro within a Panel macro. 
  3. Click Save. The table of contents appears. 
  4. Edit the page to meet your requirements. For more information, refer to Editing a Page

The Table of Contents macro creates a table of contents based on the headings on the page. For instructions on adding a table of contents to an existing page, refer to the following Atlassian help page:

Show If
groupGP-CFW_ADMINS

7.3

 Table of Contents Macro

Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue
PageWithExcerptwikicontent:Exit Disclaimer to Include

Add headings to an existing page

If the page does not already have headings, you can add them. For example, to add a level 1 heading: 

  1. Type the following. 

    Code Block
    h1.
  2. Type your heading text. 

...