admin-block-content.html.twig
Same filename in this branch
Same filename and directory in other branches
- 10 core/themes/stable9/templates/admin/admin-block-content.html.twig
- 10 core/themes/claro/templates/admin/admin-block-content.html.twig
- 11.x core/themes/stable9/templates/admin/admin-block-content.html.twig
- 11.x core/themes/claro/templates/admin/admin-block-content.html.twig
- 11.x core/modules/system/templates/admin-block-content.html.twig
- 10 core/modules/system/templates/admin-block-content.html.twig
- 9 core/themes/stable9/templates/admin/admin-block-content.html.twig
- 9 core/themes/seven/templates/admin-block-content.html.twig
- 9 core/themes/claro/templates/admin/admin-block-content.html.twig
- 9 core/themes/stable/templates/admin/admin-block-content.html.twig
- 9 core/modules/system/templates/admin-block-content.html.twig
- 8.9.x core/themes/seven/templates/admin-block-content.html.twig
- 8.9.x core/themes/claro/templates/admin/admin-block-content.html.twig
- 8.9.x core/themes/stable/templates/admin/admin-block-content.html.twig
- 8.9.x core/modules/system/templates/admin-block-content.html.twig
- 11.x core/themes/admin/templates/admin/admin-block-content.html.twig
Admin 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.
See also
template_preprocess_admin_block_content()
gin_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.
- SystemAdminThemePreprocess::preprocessSystemAdminIndex in core/
modules/ system/ src/ Theme/ SystemAdminThemePreprocess.php - Prepares variables for admin index templates.
- 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.
File
-
core/
themes/ admin/ templates/ admin/ admin-block-content.html.twig
View source
- {#
- /**
- * @file
- * Admin 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.
- *
- * @see template_preprocess_admin_block_content()
- * @see gin_preprocess_admin_block_content()
- */
- #}
- {%
- set item_classes = [
- 'admin-item',
- ]
- %}
- {% if content %}
- <div{{ attributes.addClass('admin-list', 'gin-layer-wrapper') }}>
- {% for item in content %}
- {% set description_id = item.title|render|clean_id ~ '-desc' %}
- <div{{ create_attribute({class: item_classes}) }}>
- {{ item.link }}
- <div class="admin-item__title" aria-details="{{ description_id }}">{{ item.title }}</div>
- {% if item.description %}
- <div class="admin-item__description" id="{{ description_id }}">{{ item.description }}</div>
- {% endif %}
- </div>
- {% endfor %}
- </div>
- {% endif %}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.