node-add-list.html.twig in Drupal 10
Same filename in this branch
- 10 core/themes/claro/templates/node-add-list.html.twig
- 10 core/themes/seven/templates/node-add-list.html.twig
- 10 core/modules/node/templates/node-add-list.html.twig
- 10 core/themes/starterkit_theme/templates/content-edit/node-add-list.html.twig
- 10 core/themes/classy/templates/content-edit/node-add-list.html.twig
- 10 core/themes/stable9/templates/content-edit/node-add-list.html.twig
- 10 core/themes/stable/templates/content-edit/node-add-list.html.twig
- 10 core/themes/bartik/templates/classy/content-edit/node-add-list.html.twig
- 10 core/profiles/demo_umami/themes/umami/templates/classy/content-edit/node-add-list.html.twig
Same filename and directory in other branches
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.
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.twigView source
- {#
- /**
- * @file
- * 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 template_preprocess_node_add_list()
- * @see seven_preprocess_node_add_list()
- */
- #}
- {% if content %}
- <ul class="admin-list">
- {% for type in types %}
- <li class="clearfix"><a href="{{ type.url }}"><span class="label">{{ type.label }}</span><div class="description">{{ type.description }}</div></a></li>
- {% endfor %}
- </ul>
- {% 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 %}