node-add-list.html.twig

Same filename in this branch
  1. 11.x core/profiles/demo_umami/themes/umami/templates/classy/content-edit/node-add-list.html.twig
  2. 11.x core/themes/stable9/templates/content-edit/node-add-list.html.twig
  3. 11.x core/themes/starterkit_theme/templates/content-edit/node-add-list.html.twig
  4. 11.x core/modules/node/templates/node-add-list.html.twig
Same filename and directory in other branches
  1. 9 core/profiles/demo_umami/themes/umami/templates/classy/content-edit/node-add-list.html.twig
  2. 9 core/themes/stable9/templates/content-edit/node-add-list.html.twig
  3. 9 core/themes/seven/templates/node-add-list.html.twig
  4. 9 core/themes/claro/templates/node-add-list.html.twig
  5. 9 core/themes/bartik/templates/classy/content-edit/node-add-list.html.twig
  6. 9 core/themes/stable/templates/content-edit/node-add-list.html.twig
  7. 9 core/themes/starterkit_theme/templates/content-edit/node-add-list.html.twig
  8. 9 core/themes/classy/templates/content-edit/node-add-list.html.twig
  9. 9 core/modules/node/templates/node-add-list.html.twig
  10. 8.9.x core/profiles/demo_umami/themes/umami/templates/classy/content-edit/node-add-list.html.twig
  11. 8.9.x core/themes/seven/templates/node-add-list.html.twig
  12. 8.9.x core/themes/claro/templates/node-add-list.html.twig
  13. 8.9.x core/themes/bartik/templates/classy/content-edit/node-add-list.html.twig
  14. 8.9.x core/themes/stable/templates/content-edit/node-add-list.html.twig
  15. 8.9.x core/themes/classy/templates/content-edit/node-add-list.html.twig
  16. 8.9.x core/modules/node/templates/node-add-list.html.twig
  17. 10 core/profiles/demo_umami/themes/umami/templates/classy/content-edit/node-add-list.html.twig
  18. 10 core/themes/stable9/templates/content-edit/node-add-list.html.twig
  19. 10 core/themes/claro/templates/node-add-list.html.twig
  20. 10 core/themes/starterkit_theme/templates/content-edit/node-add-list.html.twig
  21. 10 core/modules/node/templates/node-add-list.html.twig

Claro's theme implementation to list node types available for adding content.

Available variables:

  • bundles: A list of content types, each with the following properties:

    • label: Content type label.
    • add_link: \Drupal\Core\Link link instance to create an entity of this content type. This is a GeneratedLink originally and is switched by claro_preprocess_node_add_list().
    • description: Description of this type of content.

@todo Revisit after https://www.drupal.org/node/3026221 has been solved.

See also

template_preprocess_node_add_list()

claro_preprocess_node_add_list()

1 theme call to node-add-list.html.twig
NodeController::addPage in core/modules/node/src/Controller/NodeController.php
Displays add content links for available content types.

File

core/themes/claro/templates/node-add-list.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Claro's theme implementation to list node types available for adding content.
  5. *
  6. * Available variables:
  7. * - bundles: A list of content types, each with the following properties:
  8. * - label: Content type label.
  9. * - add_link: \Drupal\Core\Link link instance to create an entity of this
  10. * content type. This is a GeneratedLink originally and is switched by
  11. * claro_preprocess_node_add_list().
  12. * - description: Description of this type of content.
  13. *
  14. * @todo Revisit after https://www.drupal.org/node/3026221 has been solved.
  15. *
  16. * @see template_preprocess_node_add_list()
  17. * @see claro_preprocess_node_add_list()
  18. */
  19. #}
  20. {% extends '@claro/entity-add-list.html.twig' %}
  21. {% set create_content = path('node.type_add') %}
  22. {%
  23. set add_bundle_message = 'You have not created any content types yet. Go to the <a href="@create-content">content type creation page</a> to add a new content type.'|t({'@create-content': create_content})
  24. %}

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