From 52b57184886994e383f2228f31d5c928ce73a5a0 Mon Sep 17 00:00:00 2001 From: William Hearn Date: Tue, 8 Mar 2016 13:23:33 -0500 Subject: [PATCH] Issue #2681213: The "main" role has been used more then once --- templates/panels/page--panels--base.tpl.php | 2 +- templates/panels/page--panels--gc-intranet.tpl.php | 2 +- templates/panels/page--panels--gcweb.tpl.php | 2 +- templates/panels/page--panels--gcwu-fegc.tpl.php | 2 +- templates/panels/page--panels--ogpl.tpl.php | 2 +- templates/panels/page--panels--wet-boew.tpl.php | 2 +- templates/system/page.vars.php | 15 ++++++++++++++- 7 files changed, 20 insertions(+), 7 deletions(-) diff --git a/templates/panels/page--panels--base.tpl.php b/templates/panels/page--panels--base.tpl.php index 654d897..ca98fce 100644 --- a/templates/panels/page--panels--base.tpl.php +++ b/templates/panels/page--panels--base.tpl.php @@ -143,7 +143,7 @@ -
+
> diff --git a/templates/panels/page--panels--gc-intranet.tpl.php b/templates/panels/page--panels--gc-intranet.tpl.php index 9393b35..6bbf282 100644 --- a/templates/panels/page--panels--gc-intranet.tpl.php +++ b/templates/panels/page--panels--gc-intranet.tpl.php @@ -150,7 +150,7 @@
-
+
> diff --git a/templates/panels/page--panels--gcweb.tpl.php b/templates/panels/page--panels--gcweb.tpl.php index c297094..2302b39 100644 --- a/templates/panels/page--panels--gcweb.tpl.php +++ b/templates/panels/page--panels--gcweb.tpl.php @@ -149,7 +149,7 @@ -
+
> diff --git a/templates/panels/page--panels--gcwu-fegc.tpl.php b/templates/panels/page--panels--gcwu-fegc.tpl.php index 26a13ee..54e76f3 100644 --- a/templates/panels/page--panels--gcwu-fegc.tpl.php +++ b/templates/panels/page--panels--gcwu-fegc.tpl.php @@ -147,7 +147,7 @@
-
+
> diff --git a/templates/panels/page--panels--ogpl.tpl.php b/templates/panels/page--panels--ogpl.tpl.php index b334183..7924eff 100644 --- a/templates/panels/page--panels--ogpl.tpl.php +++ b/templates/panels/page--panels--ogpl.tpl.php @@ -143,7 +143,7 @@
-
+
> diff --git a/templates/panels/page--panels--wet-boew.tpl.php b/templates/panels/page--panels--wet-boew.tpl.php index b169b12..86306cd 100644 --- a/templates/panels/page--panels--wet-boew.tpl.php +++ b/templates/panels/page--panels--wet-boew.tpl.php @@ -149,7 +149,7 @@
-
+
> diff --git a/templates/system/page.vars.php b/templates/system/page.vars.php index cd90d31..ca5eda9 100644 --- a/templates/system/page.vars.php +++ b/templates/system/page.vars.php @@ -31,6 +31,7 @@ function wetkit_bootstrap_preprocess_page(&$variables) { $library_path = libraries_get_path($wxt_active, TRUE); $wxt_active = str_replace('-', '_', $wxt_active); $wxt_active = str_replace('theme_', '', $wxt_active); + $wxt_role_main = 'main'; // Extra variables to pass to templates. $variables['library_path'] = $library_path; @@ -175,10 +176,19 @@ function wetkit_bootstrap_preprocess_page(&$variables) { // Panels Integration. if (module_exists('page_manager')) { - $panels_wxt_active = str_replace('theme_','', $wxt_active); + $panels_wxt_active = str_replace('theme_', '', $wxt_active); // Page template suggestions for Panels pages. $panel_page = page_manager_get_current_page(); + + $panel_page_display = panels_get_current_page_display(); + if (isset($panel_page_display)) { + $panel_page_display_renderer = panels_get_renderer_handler($panel_page_display->renderer, $panel_page_display); + if (isset($panel_page_display_renderer->plugins['layout']['main']) && $panel_page_display_renderer->plugins['layout']['main'] == TRUE) { + $wxt_role_main = ''; + } + } + if (!empty($panel_page)) { // Add the active WxT theme machine name to the template suggestions. $suggestions[] = 'page__panels__' . $panels_wxt_active; @@ -209,6 +219,9 @@ function wetkit_bootstrap_preprocess_page(&$variables) { } } + // Fix for role main use in panels + $variables['wxt_role_main'] = $wxt_role_main; + // Header Navigation + Language Switcher. $menu = ($is_multilingual) ? i18n_menu_navigation_links('menu-wet-header') : menu_navigation_links('menu-wet-header'); $nav_bar_markup = theme('links__menu_menu_wet_header', array( -- 2.3.8 (Apple Git-58)