sitemap.html.twig 942 B

12345678910111213141516171819202122232425262728293031
  1. {% extends 'partials/base.html.twig' %}
  2. {% block content %}
  3. {% set language = grav.language %}
  4. {% set lang = language.enabled ? (language.active ?: language.default) : null %}
  5. {% set count = 1 %}
  6. <table class="sitemap">
  7. <thead>
  8. <tr>
  9. <th>#</th>
  10. <th>{{ 'PLUGIN_SITEMAP.TITLE_TITLE'|t }}</th>
  11. <th>{{ 'PLUGIN_SITEMAP.TITLE_LOCATION'|t }}</th>
  12. <th>{{ 'PLUGIN_SITEMAP.TITLE_LASTMOD'|t }}</th>
  13. </tr>
  14. </thead>
  15. <tbody>
  16. {% for entry in sitemap %}
  17. {% if lang is null or entry.lang == lang %}
  18. <tr>
  19. <td>{{ count }}</td>
  20. <td><a href="{{ entry.location }}">{{ entry.title ?: 'PLUGIN_SITEMAP.UNTITLED'|t }}</a></td>
  21. <td><a href="{{ entry.location }}">{{ entry.location }}</a></td>
  22. <td>{{ entry.lastmod }}</td>
  23. </tr>
  24. {% set count = count + 1 %}
  25. {% endif %}
  26. {% endfor %}
  27. </tbody>
  28. </table>
  29. {% endblock %}