node-add-list.html.twig

Same filename in this branch
  1. 8.9.x core/profiles/demo_umami/themes/umami/templates/classy/content-edit/node-add-list.html.twig
  2. 8.9.x core/themes/claro/templates/node-add-list.html.twig
  3. 8.9.x core/themes/bartik/templates/classy/content-edit/node-add-list.html.twig
  4. 8.9.x core/themes/stable/templates/content-edit/node-add-list.html.twig
  5. 8.9.x core/themes/classy/templates/content-edit/node-add-list.html.twig
  6. 8.9.x core/modules/node/templates/node-add-list.html.twig
Same filename 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. 10 core/profiles/demo_umami/themes/umami/templates/classy/content-edit/node-add-list.html.twig
  11. 10 core/themes/stable9/templates/content-edit/node-add-list.html.twig
  12. 10 core/themes/claro/templates/node-add-list.html.twig
  13. 10 core/themes/starterkit_theme/templates/content-edit/node-add-list.html.twig
  14. 10 core/modules/node/templates/node-add-list.html.twig
  15. 11.x core/profiles/demo_umami/themes/umami/templates/classy/content-edit/node-add-list.html.twig
  16. 11.x core/themes/stable9/templates/content-edit/node-add-list.html.twig
  17. 11.x core/themes/claro/templates/node-add-list.html.twig
  18. 11.x core/themes/starterkit_theme/templates/content-edit/node-add-list.html.twig
  19. 11.x core/modules/node/templates/node-add-list.html.twig

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

Available variables:

  • types: List of content types. Each content type contains:

    • url: Path to the add content of this type page.
    • label: The title of this type of content.
    • description: Description of this type of content.

See also

template_preprocess_node_add_list()

seven_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/seven/templates/node-add-list.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Seven's theme implementation to list node types available for adding content.
  5. *
  6. * Available variables:
  7. * - types: List of content types. Each content type contains:
  8. * - url: Path to the add content of this type page.
  9. * - label: The title of this type of content.
  10. * - description: Description of this type of content.
  11. *
  12. * @see template_preprocess_node_add_list()
  13. * @see seven_preprocess_node_add_list()
  14. */
  15. #}
  16. {% if content %}
  17. <ul class="admin-list">
  18. {% for type in types %}
  19. <li class="clearfix"><a href="{{ type.url }}"><span class="label">{{ type.label }}</span><div class="description">{{ type.description }}</div></a></li>
  20. {% endfor %}
  21. </ul>
  22. {% else %}
  23. <p>
  24. {% set create_content = path('node.type_add') %}
  25. {% trans %}
  26. 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.
  27. {% endtrans %}
  28. </p>
  29. {% endif %}

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