TYPO3 Logo
How to Document TYPO3
Options
Give feedback View source How to edit Edit on GitHub Full documentation (single file)

How to Document TYPO3

BASICS

  • Basic principles
  • ReST Cheat Sheet
  • Markdown Cheat Sheet

REFERENCE

  • reStructuredText
    • Code blocks and code structure
      • Code blocks with syntax highlighting
      • Configuration values (confval)
      • Inline code & text roles
      • PHP domain
      • Site settings
    • Content styles and content elements
      • Accordion
      • Admonitions: Tip, Note, Warning, See also, etc
      • Bold, Italic etc.
      • Cards
      • Comments
      • Special characters
      • Tables
      • Tabs
      • Versions
      • ViewHelper
      • Embed YouTube videos
    • Figures and diagrams
      • Images
      • PlantUML diagrams
    • Links
      • Anchors
      • API links
      • Composer / Extensions
      • Core source
      • Documentation references
      • example.org
      • External URLs
    • Lists
      • Styled numbered sections (bignums)
      • Bullet lists / unordered lists
      • Definition lists
      • Directory tree
      • List items as buttons
      • Numbered lists
    • Menus and headers
      • Headlines
      • Main menu
      • Content menu
      • Including files
      • Navigation title
      • Orphans
      • Sidebar
  • CGL for ReST files
  • File structure
  • guides.xml
  • Rendering container

HOWTOS

  • Edit Locally
  • Edit on GitHub
  • Contribute
    • Help
  • Migrate
    • Markdown to ReST
  • Render
  • Document extensions
    • Webhook
    • Reregister versions
    • FAQ
    • Contribute to system extensions
    • Contribute to third-party extensions

ADVANCED

  • Advanced
    • Coding guidelines for reST files
    • Spelling
    • Formats (reST, Markdown)
    • Spelling, terms and glossary
    • Guidelines for creating images
    • How to add translations
    • Licenses
    • Policy for making and reviewing contributions

MAINTAINERS

  • For maintainers
    • Backport changes
    • Apply changelog entries to the docs
    • Code snippet generation
    • Fluid ViewHelper reference generation
    • New major Core version is released
    • Tools of the Documentation Team
  • Sitemap
  1. How to Document
  2. reStructuredText
  3. Menus and headers
  4. Main menu
Give feedback Edit on GitHub

Main menu of a TYPO3 documentation manual

A manual consisting of more then one page should have a menu displayed on the left side of each page.

There are different strategies to get such a menu:

Automatically created alphabetic menu

If you do not want to deal with creating menus you can use the automatic menu.

Add the following option to the <guides> tag in your Documentation/guides.xml:

Documentation/guides.xml
<guides
    automatic-menu="true"
    <!-- ... -->
Copied!

Using the .. toctree:: directive takes no effect in adjusting the menu then. When you use the automatic menu you cannot influence the order in the menu.

Semi-automatic menu

If you want to display some pages on top (like installation and introduction) but list all other pages automatically you can use a .. toctree:: directive with a glob pattern on your start page:

Documentation/Index.rst
..  toctree::
    :glob:
    :hidden:

    Introduction
    Installation
    Usage/Index
    *
    */Index
Copied!

The menu will now contain first the listed pages, then all other .rst files in the root directory, then all Index.rst files in subdirectories. If you have additional .rst files in sub directories, you need to add such a toctree to the Index.rst in the sub directory.

If you use the The init command to create a new ReST documentation we prepared such a menu for you.

Manual menu using the toctree directive

You can define what should be included in the menu with the .. toctree:: directive. Only .rst files that are included in a toctree, are included in the menu.

The toctree directive can also be used to display a table of contents on current page (if :hidden: is not added in toctree).

The first headline of an .rst file is its "doctitle". That is the document's title property. The title and the following headlines are used for cross-references and appear in menus and table of contents.

:hidden: option

If you do not want to display the menu in the place where the toctree is defined use the :hidden: option. The toctree will only be used to define the right hand menu then.

..  toctree::
    :hidden:

    Introduction/Index
    Configuration/Index
Copied!

:titlesonly: and :maxdepth: options

If the menu is not hidden by default all headlines from the included pages will be displayed. If you use the option :titlesonly: only the page titles are displayed.

..  toctree::
    :glob:
    :titlesonly:
    :maxdepth: 2

    *
Copied!

You can limit the number of submenu points to be displayed in the place the menu was entered by using option :maxdepth:. Neither option influences the right hand menu.

General rules for using pages

Each .rst file that is included in the menu must have a page title and should have a short navigation title.

If a page should not be included in the menu it must be marked as :orphan: in the first line. Orphaned pages are not included in semi-automatic menus with the :glob: option. See Orphaned pages.

Each non orphaned page must be included in the menu exactly once. Including the same page in multiple pages in the menu will cause warnings and might produce unexpected results.

  • Previous
  • Next
Reference to the headline

Copy and freely share the link

This link target has no permanent anchor assigned. You can make a pull request on GitHub to suggest an anchor. The link below can be used, but is prone to change if the page gets moved.

Copy this link into your TYPO3 manual.

  • Home
  • Contact
  • Issues
  • Repository

Last rendered: May 03, 2025 12:46

© since 2017 by the TYPO3 contributors
  • Legal Notice
  • Privacy Policy
OSZAR »