Ensure an empty page title is handled correctly throughout the render system and in core themes

Created on 9 November 2023, about 1 year ago

Problem/Motivation

In certain cases you don't want to show a page title, typically for example on front pages or on other pages that need a "full page" experience.

We should check and document how that can be done best-practice.

  • Ensure there are tests for such a case
  • Document if returning NULL or an empty string ('') is correct
  • Ensure the title wrappers / blocks are hidden correctly, if there is no page title

This came up while working at Homebox 3.0.x, which has a "Show / hide page title" option for homebox pages.

Steps to reproduce

Some examples:

1. Return

$build['#title'] = NULL;

in a controller

2. Return NULL from a _title_callback in a route

3. Return '' or null from _title: in a route

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Feature request
Status

Active

Version

11.0 🔥

Component
Theme 

Last updated about 1 hour ago

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024