Skip to content

Commit

Permalink
EWPP-1411: Splash screen broken layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
yenyasinn authored and upchuk committed Aug 17, 2021
1 parent 682a786 commit bdc9f56
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions oe_theme.theme
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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;
}

/**
Expand Down

0 comments on commit bdc9f56

Please sign in to comment.