block-content-add-list.html.twig

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

Default theme implementation to present a list of custom block types.

Available variables:

  • types: A collection of all the available custom block types. Each block type contains the following:

    • link: A link to add a block of this type.
    • description: A description of this custom block type.

See also

template_preprocess_block_content_add_list()

1 theme call to block-content-add-list.html.twig
BlockContentController::add in core/modules/block_content/src/Controller/BlockContentController.php
Displays add custom block links for available types.

File

core/modules/block_content/templates/block-content-add-list.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to present a list of custom block types.
  5. *
  6. * Available variables:
  7. * - types: A collection of all the available custom block types.
  8. * Each block type contains the following:
  9. * - link: A link to add a block of this type.
  10. * - description: A description of this custom block type.
  11. *
  12. * @see template_preprocess_block_content_add_list()
  13. *
  14. * @ingroup themeable
  15. */
  16. #}
  17. {% apply spaceless %}
  18. <dl>
  19. {% for type in types %}
  20. <dt>{{ type.link }}</dt>
  21. <dd>{{ type.description }}</dd>
  22. {% endfor %}
  23. </dl>
  24. {% endapply %}

Related topics


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