block-content-add-list.html.twig

Default theme implementation to present a list of block types.

Available variables:

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

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

Deprecated

in drupal:11.3.0 and is removed from drupal:12.0.0. Use entity_add_list instead.

See also

template_preprocess_block_content_add_list()

https://www.drupal.org/node/3530643

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 block types.
  5. *
  6. * Available variables:
  7. * - types: A collection of all the available content 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 block type.
  11. *
  12. * @see template_preprocess_block_content_add_list()
  13. *
  14. * @ingroup themeable
  15. *
  16. * @deprecated in drupal:11.3.0 and is removed from drupal:12.0.0. Use entity_add_list instead.
  17. *
  18. * @see https://www.drupal.org/node/3530643
  19. */
  20. #}
  21. <dl>
  22. {% for type in types %}
  23. <dt>{{ type.link }}</dt>
  24. <dd>{{ type.description }}</dd>
  25. {% endfor %}
  26. </dl>

Related topics


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