In-page navigation/ Table of contents
Use the in-page navigation to provide quick access to the content within a page.
What it is
The In-page navigation block renders the NSW Design System In-page navigation(opens in new window) component — the “On this page” list that lets people jump straight to a section further down a long page.
It builds the list automatically from the headings that follow it, so you never add or maintain the links by hand.
- NSW Design System(opens in new window)
How to add it
Add an In-page navigation block from the block menu — usually near the top of the page, just after the introduction.
It lists every Heading 2 below it, in order — so put it above the sections it introduces. To create sections, add Heading 2 blocks; the navigation updates to match.
Configure it
The block has two options in the sidebar:
- Title — the heading shown above the list. Defaults to “On this page”.
- Heading levels — which heading levels become links. By default only Heading 2 sections are listed; include Heading 3 or Heading 4 to add finer subsections.
Tips
- Use clear, descriptive Heading 2 text — it becomes both the link label and the #fragment in the page address.
- Place the block above the sections it lists — it only lists the headings that come after it, so a navigation at the foot of a page lists nothing.
- The list updates automatically as you add, rename, or remove headings — there is nothing to keep in sync.
Related pages
- NSW Design System — In-page navigation(opens in new window)
- Sections
- Accordion
- Tabs
Example
The navigation below lists the four sections that follow it. The page’s own headings, above it, are not its sections.
First home buyer grant and assistance
A section of the example page. The navigation above links to this heading.
Buying and selling property
Another section. Renaming a heading renames its link; removing it removes the link.
Building or renovating a home
Headings below the navigation are its sections; the ones above it are not.
Aged care housing, home living assistance and retirement villages
The last section. The navigation lists the Heading 2s that follow it, in order.