node-add-list.html.twig in Open Social 8.8
Same filename and directory in other branches
- 8.9 themes/socialbase/templates/node/node-add-list.html.twig
- 8 themes/socialbase/templates/node/node-add-list.html.twig
- 8.2 themes/socialbase/templates/node/node-add-list.html.twig
- 8.3 themes/socialbase/templates/node/node-add-list.html.twig
- 8.4 themes/socialbase/templates/node/node-add-list.html.twig
- 8.5 themes/socialbase/templates/node/node-add-list.html.twig
- 8.6 themes/socialbase/templates/node/node-add-list.html.twig
- 8.7 themes/socialbase/templates/node/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
File
themes/socialbase/templates/node/node-add-list.html.twigView 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
- */
- #}
- <div class="card">
- <div class="card__block">
-
- {% if types is not empty %}
-
- {% for type in types %}
- <dl class="list-item list-item--withlabel">
- <dt class="list-item__label"><span class="btn btn-flat">{{ type.add_link }}</span></dt>
- <dd class="list-item__text">{{ type.description }}</dd>
- </dl>
- {% endfor %}
-
- {% else %}
- <div class="list-item">
- {% 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 %}
- </div>
- {% endif %}
- </div>
- </div>