- {% if app.request.attributes.get('_route_params')['_locale'] is defined %}
-     {% if app.request.host != 'vidi.ua' %}
-         <link rel="canonical"
-               href="{{ url(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}"/>
-     {% else %}
-         <link rel="canonical" href="{{ app.request.uri }}"/>
-     {% endif %}
-     {% if app.request.get('variation') %}
-         {% for locale in allowed_locales %}
-             <link rel="alternate" hreflang="{% if locale == 'ua' %}uk-ua{% else %}ru-ua{% endif %}"
-                   href="{{ absolute_url(path(app.request.attributes.get('_route'),app.request.attributes.get('_route_params')|merge({'_locale': locale, 'variation': app.request.get('variation')}))) }}"/>
-         {% endfor %}
-         <link rel="alternate" hreflang="x-default"
-               href="{{ absolute_url(path(app.request.attributes.get('_route'),app.request.attributes.get('_route_params')|merge({'_locale': 'ua', 'variation': app.request.get('variation')}))) }}"/>
-     {% else %}
-         {% for locale in allowed_locales %}
-             <link rel="alternate" hreflang="{% if locale == 'ua' %}uk-ua{% else %}ru-ua{% endif %}"
-                   href="{{ absolute_url(path(app.request.attributes.get('_route'),app.request.attributes.get('_route_params')|merge({'_locale': locale}))) }}"/>
-         {% endfor %}
-         <link rel="alternate" hreflang="x-default"
-               href="{{ absolute_url(path(app.request.attributes.get('_route'),app.request.attributes.get('_route_params')|merge({'_locale': 'ua'}))) }}"/>
-     {% endif %}
- {% endif %}