You are here

block-content-add-list.html.twig in Drupal 10

Seven's theme implementation to display a list of custom block types.

Displays the list of available custom block types for creation.

Available variables:

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

    • url: A link to add a block of this type.
    • description: A description of this custom block type.
    • label: The title of the custom block type.
    • path: A path for the link to add a block of this type.

File

core/themes/seven/templates/block-content-add-list.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Seven's theme implementation to display a list of custom block types.
  5. *
  6. * Displays the list of available custom block types for creation.
  7. *
  8. * Available variables:
  9. * - types: A collection of all the available custom block types.
  10. * Each type contains:
  11. * - url: A link to add a block of this type.
  12. * - description: A description of this custom block type.
  13. * - label: The title of the custom block type.
  14. * - path: A path for the link to add a block of this type.
  15. *
  16. * @see template_preprocess_block_content_add_list()
  17. * @see seven_preprocess_block_content_add_list()
  18. */
  19. #}
  20. <ul class="admin-list">
  21. {% for type in types %}
  22. <li class="clearfix">
  23. <a href="{{ type.url }}"><span class="label">{{ type.label }}</span><div class="description">{{ type.description }}</div></a>
  24. </li>
  25. {% endfor %}
  26. </ul>