From e0505159c7670d7d0bca22a0dbb9bec1be4efa63 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Thu, 21 May 2015 19:59:25 +0100 Subject: [PATCH] Issue #2470807 by LewisNyman, Dom., davidhernandez, emma.maria, lauriii, jp.stacey: Rename the default "Messages" region for all themes to "Highlighted" --- core/lib/Drupal/Core/Extension/ThemeHandler.php | 1 - core/lib/Drupal/Core/Render/BareHtmlPageRenderer.php | 2 +- core/modules/system/templates/install-page.html.twig | 2 +- core/modules/system/templates/maintenance-page.html.twig | 2 +- core/modules/system/templates/page.html.twig | 4 +--- .../minimal/config/install/block.block.stark_messages.yml | 2 +- .../standard/config/install/block.block.bartik_messages.yml | 2 +- .../standard/config/install/block.block.seven_messages.yml | 2 +- core/themes/bartik/bartik.info.yml | 2 +- core/themes/bartik/templates/maintenance-page.html.twig | 2 +- core/themes/bartik/templates/page.html.twig | 4 ++-- .../classy/templates/layout/maintenance-page.html.twig | 2 +- core/themes/classy/templates/layout/page.html.twig | 4 ++-- core/themes/seven/seven.info.yml | 2 +- core/themes/seven/templates/install-page.html.twig | 2 +- core/themes/seven/templates/maintenance-page.html.twig | 2 +- core/themes/seven/templates/page.html.twig | 5 ++--- 17 files changed, 19 insertions(+), 23 deletions(-) diff --git a/core/lib/Drupal/Core/Extension/ThemeHandler.php b/core/lib/Drupal/Core/Extension/ThemeHandler.php index a6baf9f7ba2e..3a419676d7cb 100644 --- a/core/lib/Drupal/Core/Extension/ThemeHandler.php +++ b/core/lib/Drupal/Core/Extension/ThemeHandler.php @@ -265,7 +265,6 @@ public function rebuildThemeData() { 'secondary_menu' => 'Secondary menu', 'footer' => 'Footer', 'highlighted' => 'Highlighted', - 'messages' => 'Messages', 'help' => 'Help', 'page_top' => 'Page top', 'page_bottom' => 'Page bottom', diff --git a/core/lib/Drupal/Core/Render/BareHtmlPageRenderer.php b/core/lib/Drupal/Core/Render/BareHtmlPageRenderer.php index bf05a3df2834..c8012c6c8a9a 100644 --- a/core/lib/Drupal/Core/Render/BareHtmlPageRenderer.php +++ b/core/lib/Drupal/Core/Render/BareHtmlPageRenderer.php @@ -52,7 +52,7 @@ public function renderBarePage(array $content, $title, $page_theme_property, arr // For backwards compatibility. // @todo In Drupal 9, add a $show_messages function parameter. if (!isset($page_additions['#show_messages']) || $page_additions['#show_messages'] === TRUE) { - $html['page']['messages'] = ['#type' => 'status_messages']; + $html['page']['highlighted'] = ['#type' => 'status_messages']; } // We must first render the contents of the html.html.twig template, see diff --git a/core/modules/system/templates/install-page.html.twig b/core/modules/system/templates/install-page.html.twig index d362d22c79c7..1d0e479b0bdf 100644 --- a/core/modules/system/templates/install-page.html.twig +++ b/core/modules/system/templates/install-page.html.twig @@ -30,7 +30,7 @@ {% if title %} <h1>{{ title }}</h1> {% endif %} - {{ page.messages }} + {{ page.highlighted }} {{ page.content }} </main> diff --git a/core/modules/system/templates/maintenance-page.html.twig b/core/modules/system/templates/maintenance-page.html.twig index f2706210f300..830ec21aae0b 100644 --- a/core/modules/system/templates/maintenance-page.html.twig +++ b/core/modules/system/templates/maintenance-page.html.twig @@ -41,7 +41,7 @@ <h1>{{ title }}</h1> {% endif %} - {{ page.messages }} + {{ page.highlighted }} {{ page.content }} </main> diff --git a/core/modules/system/templates/page.html.twig b/core/modules/system/templates/page.html.twig index eb5c7bf213a6..c5a3711ed70d 100644 --- a/core/modules/system/templates/page.html.twig +++ b/core/modules/system/templates/page.html.twig @@ -46,7 +46,6 @@ * - page.primary_menu: Items for the primary menu region. * - page.secondary_menu: Items for the secondary menu region. * - page.highlighted: Items for the highlighted content region. - * - page.messages: Status messages block can be placed in messages region. * - page.help: Dynamic help text, mostly for admin pages. * - page.content: The main content of the current page. * - page.sidebar_first: Items for the first sidebar. @@ -97,7 +96,7 @@ {{ page.breadcrumb }} - {{ page.messages }} + {{ page.highlighted }} {{ page.help }} @@ -105,7 +104,6 @@ <a id="main-content" tabindex="-1"></a>{# link is in html.html.twig #} <div class="layout-content"> - {{ page.highlighted }} {{ title_prefix }} {% if title %} diff --git a/core/profiles/minimal/config/install/block.block.stark_messages.yml b/core/profiles/minimal/config/install/block.block.stark_messages.yml index 838d8c046981..34a5e23dc9aa 100644 --- a/core/profiles/minimal/config/install/block.block.stark_messages.yml +++ b/core/profiles/minimal/config/install/block.block.stark_messages.yml @@ -3,7 +3,7 @@ theme: stark weight: 0 status: true langcode: en -region: messages +region: highlighted plugin: system_messages_block settings: id: system_messages_block diff --git a/core/profiles/standard/config/install/block.block.bartik_messages.yml b/core/profiles/standard/config/install/block.block.bartik_messages.yml index 1d817dda3fa4..0bb959079d94 100644 --- a/core/profiles/standard/config/install/block.block.bartik_messages.yml +++ b/core/profiles/standard/config/install/block.block.bartik_messages.yml @@ -3,7 +3,7 @@ theme: bartik weight: 0 status: true langcode: en -region: messages +region: highlighted plugin: system_messages_block settings: id: system_messages_block diff --git a/core/profiles/standard/config/install/block.block.seven_messages.yml b/core/profiles/standard/config/install/block.block.seven_messages.yml index 4a15ee9624c5..35c3531387a0 100644 --- a/core/profiles/standard/config/install/block.block.seven_messages.yml +++ b/core/profiles/standard/config/install/block.block.seven_messages.yml @@ -3,7 +3,7 @@ theme: seven weight: 0 status: true langcode: en -region: messages +region: highlighted plugin: system_messages_block settings: id: system_messages_block diff --git a/core/themes/bartik/bartik.info.yml b/core/themes/bartik/bartik.info.yml index 3c028944cce7..fb8f2fb05d92 100644 --- a/core/themes/bartik/bartik.info.yml +++ b/core/themes/bartik/bartik.info.yml @@ -21,7 +21,7 @@ regions: help: Help page_top: 'Page top' page_bottom: 'Page bottom' - messages: Messages + highlighted: Highlighted featured_top: 'Featured top' breadcrumb: Breadcrumb content: Content diff --git a/core/themes/bartik/templates/maintenance-page.html.twig b/core/themes/bartik/templates/maintenance-page.html.twig index c4eae0113a63..3cd787b33d01 100644 --- a/core/themes/bartik/templates/maintenance-page.html.twig +++ b/core/themes/bartik/templates/maintenance-page.html.twig @@ -39,7 +39,7 @@ <h1 class="title" id="page-title">{{ title }}</h1> {% endif %} {{ page.content }} - {{ page.messages }} + {{ page.highlighted }} </section> </main> </div> diff --git a/core/themes/bartik/templates/page.html.twig b/core/themes/bartik/templates/page.html.twig index 60b2885f82de..446814ee7dcb 100644 --- a/core/themes/bartik/templates/page.html.twig +++ b/core/themes/bartik/templates/page.html.twig @@ -49,7 +49,7 @@ * * Regions: * - page.header: Items for the header region. - * - page.messages: Status and error messages. Should be displayed prominently. + * - page.highlighted: Items for the highlighted region. * - page.primary_menu: Items for the primary menu region. * - page.secondary_menu: Items for the secondary menu region. * - page.featured_top: Items for the featured top region. @@ -109,7 +109,7 @@ {{ page.primary_menu }} </div> </header> - {{ page.messages }} + {{ page.highlighted }} {% if page.featured_top %} <div class="featured-top"> <aside class="featured-top__inner section layout-container clearfix" role="complementary"> diff --git a/core/themes/classy/templates/layout/maintenance-page.html.twig b/core/themes/classy/templates/layout/maintenance-page.html.twig index a1233e22c57a..7463b0238ca3 100644 --- a/core/themes/classy/templates/layout/maintenance-page.html.twig +++ b/core/themes/classy/templates/layout/maintenance-page.html.twig @@ -39,7 +39,7 @@ <h1>{{ title }}</h1> {% endif %} - {{ page.messages }} + {{ page.highlighted }} {{ page.content }} </main> diff --git a/core/themes/classy/templates/layout/page.html.twig b/core/themes/classy/templates/layout/page.html.twig index dcb8f4cb5253..57533c8521db 100644 --- a/core/themes/classy/templates/layout/page.html.twig +++ b/core/themes/classy/templates/layout/page.html.twig @@ -42,7 +42,7 @@ * * Regions: * - page.header: Items for the header region. - * - page.messages: Status and error messages. Should be displayed prominently. + * - page.highlighted: Items for the highlighted region. * - page.primary_menu: Items for the primary menu region. * - page.secondary_menu: Items for the secondary menu region. * - page.highlighted: Items for the highlighted content region. @@ -94,7 +94,7 @@ {{ page.breadcrumb }} - {{ page.messages }} + {{ page.highlighted }} {{ page.help }} diff --git a/core/themes/seven/seven.info.yml b/core/themes/seven/seven.info.yml index 8ee09146491d..99a3ec1e82b9 100644 --- a/core/themes/seven/seven.info.yml +++ b/core/themes/seven/seven.info.yml @@ -15,7 +15,7 @@ quickedit_stylesheets: - css/components/quickedit.css regions: content: Content - messages: Messages + highlighted: Highlighted help: Help page_top: 'Page top' page_bottom: 'Page bottom' diff --git a/core/themes/seven/templates/install-page.html.twig b/core/themes/seven/templates/install-page.html.twig index 0e22c947a254..b501fb83b7ec 100644 --- a/core/themes/seven/templates/install-page.html.twig +++ b/core/themes/seven/templates/install-page.html.twig @@ -27,7 +27,7 @@ {% if title %} <h1>{{ title }}</h1> {% endif %} - {{ page.messages }} + {{ page.highlighted }} {{ page.content }} </main> diff --git a/core/themes/seven/templates/maintenance-page.html.twig b/core/themes/seven/templates/maintenance-page.html.twig index 1bfea5a738b4..2286e8829e06 100644 --- a/core/themes/seven/templates/maintenance-page.html.twig +++ b/core/themes/seven/templates/maintenance-page.html.twig @@ -27,7 +27,7 @@ {% if title %} <h1>{{ title }}</h1> {% endif %} - {{ page.messages }} + {{ page.highlighted }} {{ page.content }} </main> diff --git a/core/themes/seven/templates/page.html.twig b/core/themes/seven/templates/page.html.twig index 4110987f0f68..1c36be5d1ae6 100644 --- a/core/themes/seven/templates/page.html.twig +++ b/core/themes/seven/templates/page.html.twig @@ -43,8 +43,7 @@ * * Regions: * - page.page_top: Items for the header region. - * - page.highlighted: Items for the highlighted content region. - * - page.messages: Status and error messages. Should be displayed prominently. + * - 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.sidebar_first: Items for the first sidebar. @@ -79,7 +78,7 @@ <main class="page-content clearfix" role="main"> <div class="visually-hidden"><a id="main-content" tabindex="-1"></a></div> - {{ page.messages }} + {{ page.highlighted }} {% if page.help %} <div class="help"> {{ page.help }} -- GitLab