You are here

admin-block-content.html.twig in Zircon Profile 8.0

Theme override for the content of an administrative block.

Available variables:

  • content: A list containing information about the block. Each element of the array represents an administrative menu item, and must at least contain the keys 'title', 'link_path', and 'localized_options', which are passed to l(). A 'description' key may also be provided.
  • attributes: HTML attributes to be added to the element.
  • compact: Boolean indicating whether compact mode is turned on or not.

File

core/themes/stable/templates/admin/admin-block-content.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for the content of an administrative block.
  5. *
  6. * Available variables:
  7. * - content: A list containing information about the block. Each element
  8. * of the array represents an administrative menu item, and must at least
  9. * contain the keys 'title', 'link_path', and 'localized_options', which are
  10. * passed to l(). A 'description' key may also be provided.
  11. * - attributes: HTML attributes to be added to the element.
  12. * - compact: Boolean indicating whether compact mode is turned on or not.
  13. *
  14. * @see template_preprocess_admin_block_content()
  15. */
  16. #}
  17. {%
  18. set classes = [
  19. 'list-group',
  20. compact ? 'compact',
  21. ]
  22. %}
  23. {% if content %}
  24. <dl{{ attributes.addClass(classes) }}>
  25. {% for item in content %}
  26. <dt class="list-group__link">{{ item.link }}</dt>
  27. {% if item.description %}
  28. <dd class="list-group__description">{{ item.description }}</dd>
  29. {% endif %}
  30. {% endfor %}
  31. </dl>
  32. {% endif %}