file block--system-branding-block.html.twig

Theme override to display the branding block.

Each branding element variable (logo, name, slogan) is only available if enabled in the block configuration.

Available variables:

  • 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.

File

templates/block/block--system-branding-block.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override to display the branding block.
  5. *
  6. * Each branding element variable (logo, name, slogan) is only available if
  7. * enabled in the block configuration.
  8. *
  9. * Available variables:
  10. * - site_logo: Logo for site as defined in Appearance or theme settings.
  11. * - site_name: Name for site as defined in Site information settings.
  12. * - site_slogan: Slogan for site as defined in Site information settings.
  13. *
  14. * @see template_preprocess_block()
  15. * @see uikit_preprocess_block()
  16. *
  17. * @ingroup uikit_themeable
  18. */
  19. #}
  20. {% if site_logo or site_name or site_slogan %}
  21. <div{{ attributes.addClass('uk-navbar-item') }}>
  22. {% if site_logo or site_name %}
  23. <a href="{{ path('<front>') }}" title="{{ 'Home'|t }}" rel="home" class="uk-logo">
  24. <img src="{{ site_logo }}" alt="{{ 'Home'|t }}" class="uk-margin-small-right" />{% if site_name %} {{ site_name }}{% endif %}
  25. </a>
  26. {% endif %}
  27. {% if site_slogan %}
  28. <span>{{ site_slogan }}</span>
  29. {% endif %}
  30. </div>
  31. {% endif %}

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Log in