vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Resources/views/Sitemap/sitemap.xml.twig line 1

Open in your IDE?
  1. {% apply spaceless %}
  2. <?xml version="1.0" encoding="UTF-8"?>
  3. <urlset xmlns:xhtml="http://www.w3.org/1999/xhtml" {% block namespaces %}xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"{% endblock %}>
  4. {% for entry in entries %}
  5. {% set location = entry.loc %}
  6. {% if domain in location %}
  7. <url>
  8. {% block url %}
  9. {% block loc %}
  10. <loc>{{ location }}</loc>
  11. {% endblock %}
  12. {% block lastmod %}
  13. {% if entry.lastmod %}
  14. <lastmod>{{ entry.lastmod|date('Y-m-d') }}</lastmod>
  15. {% endif %}
  16. {% endblock %}
  17. {% block changefreq %}
  18. {% if entry.changefreq %}
  19. <changefreq>{{ entry.changefreq }}</changefreq>
  20. {% endif %}
  21. {% endblock %}
  22. {% block priority %}
  23. {% if entry.priority %}
  24. <priority>{{ entry.priority }}</priority>
  25. {% endif %}
  26. {% endblock %}
  27. {% block alternateLinks %}
  28. {% if entry.alternateLinks|length > 1 %}
  29. {% for alternateLink in entry.alternateLinks %}
  30. {% set href = alternateLink.href %}
  31. {% if href is not empty and domain in href %}
  32. <xhtml:link rel="alternate" hreflang="{{ alternateLink.locale|replace({'_': '-'}) }}" href="{{ href }}"/>
  33. {% endif %}
  34. {% endfor %}
  35. {% endif %}
  36. {% endblock %}
  37. {% endblock %}
  38. </url>
  39. {% endif %}
  40. {% endfor %}
  41. </urlset>
  42. {% endapply %}