custom-block-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()

template_preprocess_custom_block_add_list()

1 theme call to custom-block-add-list.html.twig
CustomBlockController::add in drupal/core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php
Displays add custom block links for available types.

File

drupal/core/modules/block/custom_block/templates/custom-block-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()
  13. * @see template_preprocess_custom_block_add_list()
  14. *
  15. * @ingroup themeable
  16. */
  17. #}
  18. {% spaceless %}
  19. <dl class="node-type-list">
  20. {% for type in types %}
  21. <dt>{{ type.link }}</dt>
  22. <dd>{{ type.description }}</dd>
  23. {% endfor %}
  24. </dl>
  25. {% endspaceless %}

Related topics