TYPO3 Logo
Site Package Tutorial
Release: 13.4

Loading data.

  • Prerequisites
  • Generate a site package
  • Create initial pages
  • Assets
  • Fluid Templates
    • Fluid from the scratch
  • Content mapping
    • TypoScript imports
    • Stage
    • Subpage layout
    • Adding content
  • Menus
    • Breadcrumb
    • Breadcrumb
  • Settings
    • Usage in Fluid
  • Content Element rendering
  • Custom Content Blocks
    • Carousel
  • FAQ
  • Next Steps
  • Sitemap

Contributors Corner

  • View source of current document
  • How to edit
  • Edit current document on GitHub
  1. TYPO3 site package tutorial
  2. Menus
  3. Breadcrumb
Report issue View source How to edit Edit on GitHub

Meta menu / Footer menu in TYPO3

A meta menu - often but not always displayed in the footer of a website - displays only selected pages like "Imprint", "Contact", "Data Privacy", ...

If you use a Generated site package it already contains a meta menu in the footer of the page.

To display a breadcrumb the menu data processor can be used with the special type List or Directory.

The special menu type "List" allows you to specify a list of UIDs of pages that should be displayed in the meta menu. The special menu type "Directory" allows you to specify a folder or page of which all subpages should be displayed in the menu. We take the second approach here.

Menu of subpages TypoScript - the data processor

Line 4: Each data processor must have a unique id. We used 10 for the page-content data processor and 20 for the Main menu and 30 for the Breadcrumb therefore we now use 40.

Line 6: The values processed by the data processor should be stored in variable footerMenu.

Line 7: We configure the menu to use the special type Directory.

Line 8: The folder which contains the pages to be displayed in the footer menu can be configured via site settings. You can find the definition of this setting in file packages/my_site_package/Configuration/Sets/SitePackage/settings.definitions.yaml.

Menu of subpages - Fluid template

The special type directory delivers the items of the meta menu as an array. Therefore we can use the For ViewHelper <f:for> to loop through these elements:

packages/my_site_package/Resources/Private/PageView/Partials/Navigation/FooterMenu.html
<ul class="nav col-md-4 justify-content-end">
    <li class="nav-item"><a href="#" class="nav-link px-2 text-body-secondary">Data privacy</a></li>
    <li class="nav-item"><a href="#" class="nav-link px-2 text-body-secondary">Imprint</a></li>
</ul>
Copied!

The menu items can be displayed just as we have done in the Fluid partial of the main menu.

As we do not need to highlight active pages in the footer menu we omit those conditions.

Switching to the menu type list

If it is more feasible for your project to list all pages that should be listed in the meta menu, you can switch to using the special menu type "List" by changing the TypoScript:

packages/my_site_package/Configuration/Sets/SitePackage/settings.definitions.yaml (diff)
 40 = menu
 40 {
     as = footerMenu
-    special = directory
+    special = list
     special.value = {$MySitePackage.footerMenuRoot}
 }
Copied!

You can now change the setting to accept a comma separated list of integers and then list all pages that should be displayed in the meta menu. For example:

packages/my_site_package/Configuration/Sets/SitePackage/TypoScript/Navigation/footerMenu.typoscript (diff)
 MySitePackage.footerMenuRoot:
   label: 'Footer menu root uid'
-  description: 'The subpages of this page are displayed in the footer'
+  description: 'These pages are displayed in the footer'
   category: MySitePackage.menus
-  type: int
+  type: stringlist
-  default: 2
+  default:
+    - 5
+    - 4
+    - 3
Copied!

We are using the type stringlist - as of writing these lines - there is no integer list type in the settings yet.

  • 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: Mar 20, 2025 11:00

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