admin-block-content.html.twig

Same filename in this branch
  1. 8.9.x core/themes/seven/templates/admin-block-content.html.twig
  2. 8.9.x core/themes/claro/templates/admin/admin-block-content.html.twig
  3. 8.9.x core/themes/stable/templates/admin/admin-block-content.html.twig
Same filename in other branches
  1. 9 core/themes/stable9/templates/admin/admin-block-content.html.twig
  2. 9 core/themes/seven/templates/admin-block-content.html.twig
  3. 9 core/themes/claro/templates/admin/admin-block-content.html.twig
  4. 9 core/themes/stable/templates/admin/admin-block-content.html.twig
  5. 9 core/modules/system/templates/admin-block-content.html.twig
  6. 10 core/themes/stable9/templates/admin/admin-block-content.html.twig
  7. 10 core/themes/claro/templates/admin/admin-block-content.html.twig
  8. 10 core/modules/system/templates/admin-block-content.html.twig
  9. 11.x core/themes/stable9/templates/admin/admin-block-content.html.twig
  10. 11.x core/themes/claro/templates/admin/admin-block-content.html.twig
  11. 11.x core/modules/system/templates/admin-block-content.html.twig

Default theme implementation 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.

See also

template_preprocess_admin_block_content()

5 theme calls to admin-block-content.html.twig
EntityDisplayModeController::formModeTypeSelection in core/modules/field_ui/src/Controller/EntityDisplayModeController.php
Provides a list of eligible entity types for adding form modes.
EntityDisplayModeController::viewModeTypeSelection in core/modules/field_ui/src/Controller/EntityDisplayModeController.php
Provides a list of eligible entity types for adding view modes.
SystemController::overview in core/modules/system/src/Controller/SystemController.php
Provide the administration overview page.
SystemManager::getBlockContents in core/modules/system/src/SystemManager.php
Loads the contents of a menu block.
template_preprocess_system_admin_index in core/modules/system/system.admin.inc
Prepares variables for admin index templates.

File

core/modules/system/templates/admin-block-content.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation 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. * @ingroup themeable
  17. */
  18. #}
  19. {%
  20. set classes = [
  21. 'list-group',
  22. compact ? 'compact',
  23. ]
  24. %}
  25. {% if content %}
  26. <dl{{ attributes.addClass(classes) }}>
  27. {% for item in content %}
  28. <dt class="list-group__link">{{ item.link }}</dt>
  29. {% if item.description %}
  30. <dd class="list-group__description">{{ item.description }}</dd>
  31. {% endif %}
  32. {% endfor %}
  33. </dl>
  34. {% endif %}

Related topics


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.