Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit de13e0e8 authored by escuriola's avatar escuriola
Browse files

OEL-1160: Fix theme logo and language management.

parent 49ed6ca9
No related branches found
No related tags found
1 merge request!71OEL-1160: Header refactor.
......@@ -179,10 +179,9 @@ function oe_whitelabel_preprocess_block__system_branding_block(&$variables) {
}
else {
// Check whether ECL provides a logo for the language.
$ecl_logo = DRUPAL_ROOT . '/' . drupal_get_path('theme', 'oe_theme') . '/dist/' . $variables['ecl_component_library'] . '/images/logo/';
$ecl_logo .= $variables['ecl_component_library'] === 'eu' ? 'standard-version/positive/' : '';
$ecl_logo .= 'logo-' . $variables['ecl_component_library'] . '--' . $language_code . '.svg';
if (!file_exists($ecl_logo)) {
$bcl_logo = $variables['bcl_logo_path'] . '/' . $variables['bcl_component_library'] . '/';
$bcl_logo .= 'logo-' . $variables['bcl_component_library'] . '--' . $language_code . '.svg';
if (!file_exists($bcl_logo)) {
// Provide fallback "en" icon if language logo doesn't exist.
$variables['current_language_id'] = 'en';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment