Skip to content
Snippets Groups Projects
Commit 0249f3ed authored by Ivica Puljic's avatar Ivica Puljic
Browse files

Issue #3471592 by pivica: Add url variable to block branding block

parent ec97572b
No related branches found
No related tags found
1 merge request!3Issue #3471592: Add url variable to block branding block
......@@ -363,6 +363,8 @@ function bs_bootstrap_preprocess_block(&$variables) {
break;
case 'system_branding_block':
$variables['url'] = Url::fromRoute('<front>');
if (!empty($variables['site_logo'])) {
// Logo language variation suffix support. Check that logo with language
// prefix exist and use it (logo-de.png instead of logo.png).
......
......@@ -8,6 +8,7 @@
* - site_logo: Logo for site as defined in Appearance or theme settings.
* - site_name: Name for site as defined in Site information settings.
* - site_slogan: Slogan for site as defined in Site information settings.
* - url: URL that points to home/front page.
*
* @ingroup themeable
*/
......@@ -18,7 +19,7 @@
{% endif %}
{% block content %}
{% if site_logo -%}
<a href="{{ path('<front>') }}" class="site-logo-link{{ site_logo_svg ? ' site-logo-link--svg' }}" title="{{ 'Back to home'|t }}" aria-label="{{ 'Back to home'|t }}">
<a href="{{ url }}" class="site-logo-link{{ site_logo_svg ? ' site-logo-link--svg' }}" title="{{ 'Back to home'|t }}" aria-label="{{ 'Back to home'|t }}">
{%- if site_logo_svg -%}
{{- site_logo_svg|raw -}}
{%- else -%}
......@@ -27,7 +28,7 @@
</a>
{%- endif %}
{% if site_name -%}
<a href="{{ path('<front>') }}" title="{{ 'Back to home'|t }}" class="site-name">{{ site_name }}</a>
<a href="{{ url }}" title="{{ 'Back to home'|t }}" class="site-name">{{ site_name }}</a>
{%- endif %}
{% if site_slogan -%}
<div class="site-slogan">{{ site_slogan }}</div>
......
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