{% set host = app.request.schemeAndHttpHost() %}
{% extends 'Default/menu.html.twig' %}
{% block content %}
<?xml version="1.0" encoding="UTF-8"?>
<urlset
      xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
      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">
	<url>
	  <loc>{{host}}</loc>
	  <lastmod>{{'now'|date('Y-m-d')}}</lastmod>
	  <priority>1.00</priority>
	</url>
	{% for o in menus %}
	{% if o.href is defined and o.href and (host not in o.href and 'http' not in o.href) %}
	<url>
	  <loc>{{host not in o.href ? host}}{{o.href}}</loc>
	  <lastmod>{{'now'|date('Y-m-d')}}</lastmod>
	  <priority>0.90</priority>
	</url>
	{% endif %}
	{% if o.submenus is defined %}
	{% for k in o.submenus %}

    {% if k.href is defined and k.href and (host not in k.href and 'http' not in k.href) %}
    <url>
	  <loc>{{host not in k.href ? host}}{{k.href}}</loc>
	  <lastmod>{{'now'|date('Y-m-d')}}</lastmod>
	  <priority>0.80</priority>
	</url>
    {% endif %}
	{% endfor %}
	{% endif %}
	{% endfor %}
</urlset>

{% endblock %}
