{# On boucle sur les URLs #} {% for url in urls %} {# On vérifie si le nom d'hôte (hostname) est présent dans l'url #} {# Si il n'y est pas, on l'ajoute #} {% if url.loc | replace({hostname: ''}) == url.loc %} {{ hostname }}{{ url.loc }} {% else %} {{ url.loc }} {% endif %} {# Si il y a une date de modification #} {% if url.lastmod is defined and url.lastmod is not empty %} {{url.lastmod}} {% endif %} {# Si il y a une fréquence de modification #} {% if url.changefreq is defined %} {{url.changefreq}} {% endif %} {# Si il y a une priorité #} {% if url.priority is defined %} {{url.priority}} {% endif %} {# Si il y a une image #} {% if url.images is defined and url.images is not empty %} {% for image in url.images %} {%if image.loc|replace({hostname:''}) == image.loc%} {{hostname}}{{image.loc}} {%else%} {{image.loc}} {%endif%} {{ image.title }} {% endfor %} {% endif %} {% endfor %}