templates/sitemap/index.xml.twig line 1

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
  3.         xmlns:xhtml="http://www.w3.org/1999/xhtml">
  4.     {% for url in urls %}
  5.         <url>
  6.             <loc>{{ url.loc }}</loc>
  7.             {% if url.lastmod %}
  8.                 <lastmod>{{ url.lastmod|date('Y-m-d\TH:i:sP') }}</lastmod>
  9.             {% endif %}
  10.             {% if url.changefreq %}
  11.                 <changefreq>{{ url.changefreq }}</changefreq>
  12.             {% endif %}
  13.             {% if url.priority %}
  14.                 <priority>{{ url.priority }}</priority>
  15.             {% endif %}
  16.             {% for alternate in url.alternates %}
  17.                 <link
  18.                         rel="alternate"
  19.                         hreflang="{{ alternate.hreflang }}"
  20.                         href="{{ alternate.href }}" />
  21.             {% endfor %}
  22.         </url>
  23.     {% endfor %}
  24. </urlset>