Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EWPP-1411: Splash screen broken layout. #916

Merged
merged 1 commit into from
Aug 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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