Change record status: 
Project: 
Introduced in branch: 
8.0.x
Description: 

The page title was previously printed directly in the page template using a special variable just for the title.

This is the previous code from the default page template:

  {% if title %}
    <h1>{{ title }}</h1>
  {% endif %}

The page title is now provided by a block so it can be easily moved without editing the page template.

The markup for the page title can be edited in page-title.html.twig, and template_preprocess_page_title() can be used in conjunction with the template. For example, the shortcut module uses this preprocess function to place shortcuts in the title_suffix after the page title.

The page title variable is still placed manually in the maintenance and install page templates, as blocks are not available during site installation and maintenance.

Impacts: 
Site builders, administrators, editors
Module developers
Themers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done

Comments

Anonymous’s picture

FYI: there is no template_preprocess_page_title that is mentioned in here or in the template file.

JeffC518’s picture

It's been a year, but there is now. I'm using Drupal 8.1.

It goes in your themename.theme file:

<?php
function themename_preprocess_page_title(&$variables) {
  kint($variables);
}

?>