default.html.twig 705 B

12345678910111213141516171819202122232425
  1. {%- set request = grav.request -%}
  2. {%- set object_context = object ?? {} -%}
  3. {%- set object_layout = object_context.layout ?? ('list-' ~ layout) -%}
  4. {% if blacklist %}
  5. {% set collection = collection.unselect(blacklist) %}
  6. {% endif %}
  7. <div id="flex-objects">
  8. {% if title %}
  9. <h2>{{ title|e }}</h2>
  10. {% endif %}
  11. {% if content %}
  12. <div>{{ content|markdown }}</div>
  13. {% endif %}
  14. <ul class="list">
  15. {% for object in collection %}
  16. {% set link = request.uri ~ '/id:' ~ object.key %}
  17. <li>
  18. {% render object layout: object_layout with object_context|merge({link: link}) %}
  19. </li>
  20. {% endfor %}
  21. </ul>
  22. </div>