Documentation

Smart Marketing Blocks Documentation

Product guidance, setup notes and block reference articles for Smart Marketing Blocks customers.

Table of Contents

Purpose

The block automatically builds a page table of contents from headings and adds anchor links.

Content

  • Title: the table of contents heading, edited directly in the block.

Settings

  • H2: includes h2 headings in the table of contents.
  • H3: includes h3 headings in the table of contents.
  • H4: includes h4 headings in the table of contents.
  • Show numbering: enables a numbered list. If disabled, the frontend list receives list-style: none.

Typography Settings

  • Title text size: the table of contents heading size.

Color Settings

  • Title Color: the table of contents heading color.
  • List Color: the link list color.
  • Background color: the block background.

Frontend Behavior

On the frontend, the script looks for headings of the selected levels on the page, excluding the table of contents block itself. If a heading has no id, the script creates an anchor from the heading text. If there are no matching headings, the block is hidden.

Clicking a link enables smooth scrolling through scrollBehavior.

Pro Settings

The interface marks the following as Pro features: sticky mode, active section highlighting, nested numbering, exclusions, and scroll offset.