The Table of Contents component displays a list of clickable headings corresponding to the sections on the page which allows users to navigate directly to different sections on the page.
The Table of Contents (TOC) component should only be used on lengthy pages that contain multiple headers/sections. Historically, some pages have used an accordion to organize what could be headers and text in an effort to make the page easier to read and navigate. The TOC is an excellent alternative in these cases.
Content authors can add the TOC component to the main page body or in the right rail. The TOC list is automatically generated by using the headings (h1, h2, etc.) on the page and building a clickable list of the headings. If a user clicks on a heading in the TOC, they are taken to that section of the page.
Currently, if the TOC is placed in the main body of the page, all of the headings will be listed and content authors will not be allowed to specify which headings are displayed. If the TOC is placed in the right rail, content authors can specify the heading levels to be displayed.
In the main body, the TOC displays as a bulleted list without a title.
In the right rail, the TOC displays without bullets and has "On This Page" as the title.
Fun Fact:
The Table of Contents is sticky!
When placed in the right rail, the Table of Contents will move up or down with the page as the user scrolls.
Table of Contents in the main section of the page:
Table of Contents in the right rail:
The configure dialog allows the content author to define list type, heading levels, and ID for the right rail only.