diff --git a/core/lib/Drupal/Core/Extension/ThemeHandler.php b/core/lib/Drupal/Core/Extension/ThemeHandler.php index 1613424..2eb56bc 100644 --- a/core/lib/Drupal/Core/Extension/ThemeHandler.php +++ b/core/lib/Drupal/Core/Extension/ThemeHandler.php @@ -269,7 +269,6 @@ public function rebuildThemeData() { 'page_top' => 'Page top', 'page_bottom' => 'Page bottom', 'breadcrumb' => 'Breadcrumb', - 'page_title' => 'Page title', ), 'description' => '', 'features' => $this->defaultFeatures, diff --git a/core/lib/Drupal/Core/Render/Plugin/DisplayVariant/SimplePageVariant.php b/core/lib/Drupal/Core/Render/Plugin/DisplayVariant/SimplePageVariant.php index de8bf09..6949846 100644 --- a/core/lib/Drupal/Core/Render/Plugin/DisplayVariant/SimplePageVariant.php +++ b/core/lib/Drupal/Core/Render/Plugin/DisplayVariant/SimplePageVariant.php @@ -55,8 +55,11 @@ public function setTitle($title) { */ public function build() { $build = [ - 'title' => $this->title, 'content' => [ + 'title' => [ + '#markup' => '

' . $this->title . '

', + '#weight' => -900, + ], 'main_content' => $this->mainContent, 'messages' => [ '#type' => 'status_messages', diff --git a/core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php b/core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php index 65e9323..c4f5db5 100644 --- a/core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php +++ b/core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php @@ -189,7 +189,10 @@ public function build() { // Analogously for the page title. if (!$title_block_displayed) { - $build['title'] = $this->title; + $build['content']['title'] = [ + '#markup' => $this->title, + '#weight' => -900, + ]; } // The access results' cacheability is currently added to the top level of the diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 50ebd3c..5c327f7 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -816,10 +816,8 @@ function system_preprocess_block(&$variables) { case 'system_page_title_block': $variables['title'] = ''; - if(property_exists($variables['content']['title'], 'markup') && $variables['content']['title']['#markup']) { + if($variables['content']['title']['#markup']) { $variables['title'] = $variables['content']['title']['#markup']; - } else if ($variables['content']['title']) { - $variables['title'] = $variables['content']['title']; } break; } diff --git a/core/modules/system/templates/install-page.html.twig b/core/modules/system/templates/install-page.html.twig index 1d0e479..9c1ee12 100644 --- a/core/modules/system/templates/install-page.html.twig +++ b/core/modules/system/templates/install-page.html.twig @@ -27,9 +27,6 @@
- {% if title %} -

{{ title }}

- {% endif %} {{ page.highlighted }} {{ page.content }}
diff --git a/core/modules/system/templates/maintenance-page.html.twig b/core/modules/system/templates/maintenance-page.html.twig index 748ed5a..67967ef 100644 --- a/core/modules/system/templates/maintenance-page.html.twig +++ b/core/modules/system/templates/maintenance-page.html.twig @@ -32,10 +32,6 @@
- {% if title %} -

{{ title }}

- {% endif %} - {{ page.highlighted }} {{ page.content }} diff --git a/core/modules/system/templates/page.html.twig b/core/modules/system/templates/page.html.twig index a8d7483..360b984 100644 --- a/core/modules/system/templates/page.html.twig +++ b/core/modules/system/templates/page.html.twig @@ -26,10 +26,6 @@ * slogan has been disabled in theme settings. * * Page content (in order of occurrence in the default page.html.twig): - * - title_prefix: Additional output populated by modules, intended to be - * displayed in front of the main title tag that appears in the template. - * - title_suffix: Additional output populated by modules, intended to be - * displayed after the main title tag that appears in the template. * - messages: Status and error messages. Should be displayed prominently. * - node: Fully loaded node, if there is an automatically-loaded node * associated with the page and the node ID is the second argument in the @@ -47,7 +43,6 @@ * - page.sidebar_second: Items for the second sidebar. * - page.footer: Items for the footer region. * - page.breadcrumb: Items for the breadcrumb region. - * - page.title: Items for the page title region. * * @see template_preprocess_page() * @see html.html.twig @@ -100,10 +95,6 @@ {# link is in html.html.twig #}
- - {{ title_prefix }} - {{ page.title }} - {{ title_suffix }} {{ page.content }}
{# /.layout-content #} diff --git a/core/profiles/minimal/config/install/block.block.stark_page_title.yml b/core/profiles/minimal/config/install/block.block.stark_page_title.yml index 8263474..b1c4f5a 100644 --- a/core/profiles/minimal/config/install/block.block.stark_page_title.yml +++ b/core/profiles/minimal/config/install/block.block.stark_page_title.yml @@ -1,9 +1,9 @@ id: stark_page_title theme: stark -weight: 10 +weight: -30 status: true langcode: en -region: title +region: content plugin: system_page_title_block settings: id: system_page_title_block diff --git a/core/profiles/standard/config/install/block.block.bartik_page_title.yml b/core/profiles/standard/config/install/block.block.bartik_page_title.yml index ff73d59..c78d10d 100644 --- a/core/profiles/standard/config/install/block.block.bartik_page_title.yml +++ b/core/profiles/standard/config/install/block.block.bartik_page_title.yml @@ -1,9 +1,9 @@ id: bartik_page_title theme: bartik -weight: 10 +weight: -50 status: true langcode: en -region: title +region: content plugin: system_page_title_block settings: id: system_page_title_block diff --git a/core/profiles/standard/config/install/block.block.seven_page_title.yml b/core/profiles/standard/config/install/block.block.seven_page_title.yml index ae1cb30..8f0049c 100644 --- a/core/profiles/standard/config/install/block.block.seven_page_title.yml +++ b/core/profiles/standard/config/install/block.block.seven_page_title.yml @@ -1,9 +1,9 @@ id: page_title theme: seven -weight: 0 +weight: -30 status: true langcode: en -region: title +region: content plugin: system_page_title_block settings: id: system_page_title_block diff --git a/core/themes/bartik/bartik.info.yml b/core/themes/bartik/bartik.info.yml index 4bebcd5..8b52f48 100644 --- a/core/themes/bartik/bartik.info.yml +++ b/core/themes/bartik/bartik.info.yml @@ -22,7 +22,6 @@ regions: highlighted: Highlighted featured_top: 'Featured top' breadcrumb: Breadcrumb - title: Title content: Content sidebar_first: 'Sidebar first' sidebar_second: 'Sidebar second' diff --git a/core/themes/bartik/templates/maintenance-page.html.twig b/core/themes/bartik/templates/maintenance-page.html.twig index 3cd787b..f071245 100644 --- a/core/themes/bartik/templates/maintenance-page.html.twig +++ b/core/themes/bartik/templates/maintenance-page.html.twig @@ -35,9 +35,6 @@
- {% if title %} -

{{ title }}

- {% endif %} {{ page.content }} {{ page.highlighted }}
diff --git a/core/themes/bartik/templates/page.html.twig b/core/themes/bartik/templates/page.html.twig index 09a90f3..e9121cd 100644 --- a/core/themes/bartik/templates/page.html.twig +++ b/core/themes/bartik/templates/page.html.twig @@ -56,7 +56,6 @@ * - page.footer_fourth: Items for the fourth footer column. * - page.footer_fifth: Items for the fifth footer column. * - page.breadcrumb: Items for the breadcrumb region. - * - page.title: Items for the page title region. * * @see template_preprocess_page() * @see bartik_preprocess_page() @@ -120,7 +119,6 @@
- {{ page.title }} {{ page.content }}
diff --git a/core/themes/classy/templates/layout/maintenance-page.html.twig b/core/themes/classy/templates/layout/maintenance-page.html.twig index 7463b02..5e3b73c 100644 --- a/core/themes/classy/templates/layout/maintenance-page.html.twig +++ b/core/themes/classy/templates/layout/maintenance-page.html.twig @@ -35,10 +35,6 @@
- {% if title %} -

{{ title }}

- {% endif %} - {{ page.highlighted }} {{ page.content }} diff --git a/core/themes/classy/templates/layout/page.html.twig b/core/themes/classy/templates/layout/page.html.twig index 29dc472..76a4fe2 100644 --- a/core/themes/classy/templates/layout/page.html.twig +++ b/core/themes/classy/templates/layout/page.html.twig @@ -43,7 +43,6 @@ * - page.sidebar_second: Items for the second sidebar. * - page.footer: Items for the footer region. * - page.breadcrumb: Items for the breadcrumb region. - * - page.title: Items for the page title region. * * @see template_preprocess_page() * @see html.html.twig @@ -95,7 +94,6 @@
{{ page.highlighted }} - {{ page.title }} {{ page.content }}
{# /.layout-content #} diff --git a/core/themes/seven/seven.info.yml b/core/themes/seven/seven.info.yml index bcb9d7c..1427896 100644 --- a/core/themes/seven/seven.info.yml +++ b/core/themes/seven/seven.info.yml @@ -23,6 +23,5 @@ regions: page_top: 'Page top' page_bottom: 'Page bottom' sidebar_first: 'First sidebar' - title: Title regions_hidden: - sidebar_first diff --git a/core/themes/seven/templates/install-page.html.twig b/core/themes/seven/templates/install-page.html.twig index b501fb8..8c2828f 100644 --- a/core/themes/seven/templates/install-page.html.twig +++ b/core/themes/seven/templates/install-page.html.twig @@ -24,9 +24,6 @@ {% endif %}
- {% if title %} -

{{ title }}

- {% endif %} {{ page.highlighted }} {{ page.content }}
diff --git a/core/themes/seven/templates/maintenance-page.html.twig b/core/themes/seven/templates/maintenance-page.html.twig index 2286e88..8966ddc 100644 --- a/core/themes/seven/templates/maintenance-page.html.twig +++ b/core/themes/seven/templates/maintenance-page.html.twig @@ -24,9 +24,6 @@ {% endif %}
- {% if title %} -

{{ title }}

- {% endif %} {{ page.highlighted }} {{ page.content }}
diff --git a/core/themes/seven/templates/page.html.twig b/core/themes/seven/templates/page.html.twig index 92caec2..650191a 100644 --- a/core/themes/seven/templates/page.html.twig +++ b/core/themes/seven/templates/page.html.twig @@ -39,7 +39,6 @@ * - page.highlighted: Items for the highlighted region. * - page.help: Dynamic help text, mostly for admin pages. * - page.content: The main content of the current page. - * - page.title: Items for the page title region. * * @see template_preprocess_page() * @see seven_preprocess_page() @@ -48,9 +47,6 @@ #}
- {% if page.title %} - {{ page.title }} - {% endif %} {{ page.header }}