You are here

admin-block-content.html.twig in Drupal 8

Claro's theme implementation for the content of an administrative block.

Available variables:

  • content: List of administrative menu items. Each menu item contains:

    • link: Link to the admin section.
    • title: Short name of the section.
    • description: Description of the administrative menu item.
  • attributes: HTML attributes to be added to the element.
  • compact: Boolean indicating whether compact mode is turned on or not.

File

core/themes/claro/templates/admin/admin-block-content.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Claro's theme implementation for the content of an administrative block.
  5. *
  6. * Available variables:
  7. * - content: List of administrative menu items. Each menu item contains:
  8. * - link: Link to the admin section.
  9. * - title: Short name of the section.
  10. * - description: Description of the administrative menu item.
  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. * @see claro_preprocess_admin_block_content()
  16. */
  17. #}
  18. {%
  19. set item_classes = [
  20. 'admin-item',
  21. ]
  22. %}
  23. {% if content %}
  24. <dl{{ attributes.addClass('admin-list') }}>
  25. {% for item in content %}
  26. <div{{ create_attribute({class: item_classes}) }}>
  27. <dt class="admin-item__title">{{ item.link }}</dt>
  28. {% if item.description %}
  29. <dd class="admin-item__description">{{ item.description }}</dd>
  30. {% endif %}
  31. </div>
  32. {% endfor %}
  33. </dl>
  34. {% endif %}