Table of Contentsv1

Component that renders a table of content to help navigate the page content.

Examples

Standard

Default table of contents without any configuration.

The default list type is bulleted, default start level is h1 and default stop level is h6.

List Type

Configuring the list type to numbered.

Start Level

Configuring the start level to h2.

               
               
  1. startLevel: h2
  2. sling:resourceType: core-components-examples/components/tableofcontents
  3. listType: numbered

Stop Level

Configuring the stop level to h2.

               
               
  1. startLevel: h2
  2. sling:resourceType: core-components-examples/components/tableofcontents
  3. listType: numbered
  4. stopLevel: h2

ID

Configuring the id to sample-id.

               
               
  1. startLevel: h2
  2. id: sample-id
  3. sling:resourceType: core-components-examples/components/tableofcontents
  4. listType: numbered
  5. stopLevel: h2