node-add-list.html.twig
Same filename in this branch
- 9 core/profiles/demo_umami/themes/umami/templates/classy/content-edit/node-add-list.html.twig
- 9 core/themes/stable9/templates/content-edit/node-add-list.html.twig
- 9 core/themes/seven/templates/node-add-list.html.twig
- 9 core/themes/claro/templates/node-add-list.html.twig
- 9 core/themes/bartik/templates/classy/content-edit/node-add-list.html.twig
- 9 core/themes/stable/templates/content-edit/node-add-list.html.twig
- 9 core/themes/starterkit_theme/templates/content-edit/node-add-list.html.twig
- 9 core/themes/classy/templates/content-edit/node-add-list.html.twig
Same filename in other branches
- 8.9.x core/profiles/demo_umami/themes/umami/templates/classy/content-edit/node-add-list.html.twig
- 8.9.x core/themes/seven/templates/node-add-list.html.twig
- 8.9.x core/themes/claro/templates/node-add-list.html.twig
- 8.9.x core/themes/bartik/templates/classy/content-edit/node-add-list.html.twig
- 8.9.x core/themes/stable/templates/content-edit/node-add-list.html.twig
- 8.9.x core/themes/classy/templates/content-edit/node-add-list.html.twig
- 8.9.x core/modules/node/templates/node-add-list.html.twig
- 10 core/profiles/demo_umami/themes/umami/templates/classy/content-edit/node-add-list.html.twig
- 10 core/themes/stable9/templates/content-edit/node-add-list.html.twig
- 10 core/themes/claro/templates/node-add-list.html.twig
- 10 core/themes/starterkit_theme/templates/content-edit/node-add-list.html.twig
- 10 core/modules/node/templates/node-add-list.html.twig
- 11.x core/profiles/demo_umami/themes/umami/templates/classy/content-edit/node-add-list.html.twig
- 11.x core/themes/stable9/templates/content-edit/node-add-list.html.twig
- 11.x core/themes/claro/templates/node-add-list.html.twig
- 11.x core/themes/starterkit_theme/templates/content-edit/node-add-list.html.twig
- 11.x core/modules/node/templates/node-add-list.html.twig
Default theme implementation to list node types available for adding content.
This list is displayed on the Add content admin page.
Available variables:
- types: A list of content types, each with the following properties:
- add_link: Link to create a piece of content of this type.
- description: Description of this type of content.
See also
template_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/
modules/ node/ templates/ node-add-list.html.twig
View source
- {#
- /**
- * @file
- * Default theme implementation to list node types available for adding content.
- *
- * This list is displayed on the Add content admin page.
- *
- * Available variables:
- * - types: A list of content types, each with the following properties:
- * - add_link: Link to create a piece of content of this type.
- * - description: Description of this type of content.
- *
- * @see template_preprocess_node_add_list()
- *
- * @ingroup themeable
- */
- #}
- {% if types is not empty %}
- <dl>
- {% for type in types %}
- <dt>{{ type.add_link }}</dt>
- <dd>{{ type.description }}</dd>
- {% endfor %}
- </dl>
- {% else %}
- <p>
- {% set create_content = path('node.type_add') %}
- {% trans %}
- 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.
- {% endtrans %}
- </p>
- {% endif %}
Related topics
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.