src/Eccube/Resource/template/default/sitemap.xml.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:image="http://www.google.com/schemas/sitemap-image/1.1">
  3. {# Pages #}
  4. {% if DefaultPages is defined %}
  5. {% for DefaultPage in DefaultPages %}
  6.   {% if DefaultPage.url != 'product_detail' and DefaultPage.url != 'product_list' %}
  7.   <url>
  8.     <loc>{{url(DefaultPage.url)}}</loc>
  9.     <lastmod>{{DefaultPage.update_date|date_format('','c')}}</lastmod>
  10.     <changefreq>daily</changefreq>
  11.   </url>
  12.   {% endif %}
  13. {% endfor %}
  14. {% endif %}
  15. {% if UserPages is defined %}
  16. {% for UserPage in UserPages %}
  17.   <url>
  18.     <loc>{{url('user_data', {route: UserPage.url})}}</loc>
  19.     <lastmod>{{UserPage.update_date|date_format('','c')}}</lastmod>
  20.     <changefreq>daily</changefreq>
  21.   </url>
  22. {% endfor %}
  23. {% endif %}
  24. {# Categories #}
  25. {% if Categories is defined %}
  26. {% for Category in Categories %}
  27.   <url>
  28.     <loc>{{ url('product_list') }}?category_id={{Category.id}}</loc>
  29.     <lastmod>{{Category.update_date|date_format('','c')}}</lastmod>
  30.     <changefreq>daily</changefreq>
  31.   </url>
  32. {% endfor %}
  33. {% endif %}
  34. {# Products #}
  35. {% if Products is defined %}
  36. {% for Product in Products %}
  37.   <url>
  38.     <loc>{{ url('product_detail', {'id': Product.id}) }}</loc>
  39.     <lastmod>{{Product.update_date|date_format('','c')}}</lastmod>
  40.     <changefreq>daily</changefreq>
  41.     {% for ProductImage in Product.ProductImage %}
  42.     <image:image>
  43.       <image:loc>{{ absolute_url(asset(ProductImage, 'save_image')) }}</image:loc>
  44.     </image:image>
  45.     {% endfor %}
  46.   </url>
  47. {% endfor %}
  48. {% endif %}
  49. </urlset>