diff --git a/oe_theme.theme b/oe_theme.theme index 5a8b9cc3e..535b1e6a1 100644 --- a/oe_theme.theme +++ b/oe_theme.theme @@ -1555,6 +1555,10 @@ function oe_theme_preprocess_paragraph__oe_banner(array &$variables): void { * Implements hook_theme_suggestions_HOOK_alter(). */ function oe_theme_theme_suggestions_page_alter(array &$suggestions, array $variables): void { + // Set branding template in the beginning as more common. + $branding = theme_get_setting('branding') ?? 'core'; + array_unshift($suggestions, 'page__ecl_branding__' . $branding); + $route = \Drupal::routeMatch(); if ($route->getRouteName() === 'entity.node.canonical') { $suggestions[] = 'page__node__' . $route->getParameter('node')->bundle(); @@ -1563,8 +1567,6 @@ function oe_theme_theme_suggestions_page_alter(array &$suggestions, array $varia $suggestions[] = 'page__node__' . $route->getParameter('node_preview')->bundle(); $suggestions[] = 'page__node__preview__' . $route->getParameter('node_preview')->bundle(); } - $branding = theme_get_setting('branding') ?? 'core'; - $suggestions[] = 'page__ecl_branding__' . $branding; } /**