From b6dfcd4485bb8a3bb33fd10b83675c8f17d01179 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Thu, 26 Apr 2018 12:29:00 +0200 Subject: [PATCH] head title always = only site name --- .../themes/custom/edlptheme/edlptheme.theme | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/sites/all/themes/custom/edlptheme/edlptheme.theme b/sites/all/themes/custom/edlptheme/edlptheme.theme index 3b4511692..718f45dde 100644 --- a/sites/all/themes/custom/edlptheme/edlptheme.theme +++ b/sites/all/themes/custom/edlptheme/edlptheme.theme @@ -22,7 +22,22 @@ use Drupal\Core\Render\Element; // dpm('edlptheme_page_attachments', $attachments); // } - +/** + * Prepares variables for HTML document templates. + * + * Default template: html.html.twig. + * + * @param array $variables + * An associative array containing: + * - page: A render element representing the page. + */ +function edlptheme_preprocess_html(&$vars) { + $site_config = \Drupal::config('system.site'); + $head_title = [ + 'name' => $site_config->get('name'), + ]; + $vars['head_title'] = $head_title; +} function edlptheme_preprocess_page(&$vars){ // dsm($vars, 'vars'); @@ -250,5 +265,5 @@ function edlptheme_preprocess_links__language_block(&$vars){ } function edlptheme_preprocess_file_link(&$vars){ - + }