You are here

node-add-list.html.twig in Open Social 8.6

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.

File

themes/socialbase/templates/node/node-add-list.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to list node types available for adding content.
  5. *
  6. * This list is displayed on the Add content admin page.
  7. *
  8. * Available variables:
  9. * - types: A list of content types, each with the following properties:
  10. * - add_link: Link to create a piece of content of this type.
  11. * - description: Description of this type of content.
  12. *
  13. * @see template_preprocess_node_add_list()
  14. *
  15. * @ingroup themeable
  16. */
  17. #}
  18. <div class="card">
  19. <div class="card__block">
  20. {% if types is not empty %}
  21. {% for type in types %}
  22. <dl class="list-item list-item--withlabel">
  23. <dt class="list-item__label"><span class="btn btn-flat">{{ type.add_link }}</span></dt>
  24. <dd class="list-item__text">{{ type.description }}</dd>
  25. </dl>
  26. {% endfor %}
  27. {% else %}
  28. <div class="list-item">
  29. {% set create_content = path('node.type_add') %}
  30. {% trans %}
  31. 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.
  32. {% endtrans %}
  33. </div>
  34. {% endif %}
  35. </div>
  36. </div>