templates/front/pages/sitemap.html.twig line 1

Open in your IDE?
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
  3.     {% for url in urls %}
  4.         <url>
  5.             <loc>
  6.                 {% if url.loc|replace({hostname:''}) == url.loc %}
  7.                     {{ hostname }}{{ url.loc }}
  8.                 {% else %}
  9.                     {{ url.loc }}
  10.                 {% endif %}
  11.             </loc>
  12.             {% if url.lastmod is defined %}
  13.                 <lastmod>{{ url.lastmod }}</lastmod>
  14.             {% endif %}
  15.             {% if url.changefreq is defined %}
  16.                 <changefreq>{{ url.changefreq }}</changefreq>
  17.             {% endif %}
  18.             {% if url.priority is defined %}
  19.                 <priority>{{ url.priority }}</priority>
  20.             {% endif %}
  21.             {% if url.image is defined and url.image is not empty %}
  22.                 <image:image>
  23.                     <image:loc>{% if url.image.loc|replace({hostname:''}) == url.image.loc %}{{ hostname }}{{ url.image.loc }}{% else %}{{ url.image.loc }}{% endif %}</image:loc>
  24.                     <image:title>{{ url.image.title }}</image:title>
  25.                 </image:image>
  26.             {% endif %}
  27.         </url>
  28.     {% endfor %}
  29. </urlset>