This is a read-only copy of the MariaDB Knowledgebase generated on 2024-12-22. For the latest, interactive version please visit https://mariadb.com/kb/.

The <<toc>> Macro

Syntax

<<toc [title="title name"] [depth=X] [layout=standalone]>>

The "title" parameter is optional. If not used the title of the table of contents box will be "Contents". The "depth" parameter is optional. It controls how many layers of headings the TOC will list. If omitted it defaults to 5. A depth of 1 will only display the title. The "layout" parameter is optional. By default the TOC will be floated right. If layout is "standalone" then it will span the entire article.

<<toc-item slug="mariadb#blah" [level=##]>>Title goes here<</toc-item>>

The optional "level" parameter is zero based and has limited use. It can't break multiple levels of indent, but it can be used to help things look consistent.

About

The <<toc>> macro allows you to add a table of contents (toc) to your articles. Just place the tag wherever you want the toc to be. The toc is built based on the headings of your article.

To demonstrate this macro, I will place the <<toc>> macro, followed by some headings, immediately after this paragraph. For a demonstration of toc-item and titles, see the TOC test page and the source of the TOC Test page.

Heading One

Heading Two

Heading Three

Heading Four

Subheading One

Sub-sub Heading

Subheading Two

Heading Five

Heading Six

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.