<?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.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
    {% if system_routes is defined and system_routes | length > 0 %}
        {% for group, routes in system_routes %}
            {% if group != "information" %}
                {% for route, info in routes %}
                    {% if route != 'office_brain_search_bundle_browse_category' %}
                        <url>
                            <loc>{{ app.request.schemeAndHttpHost ~ path(route) }}</loc>
                            <lastmod>{{ "now" | date() }}</lastmod>
                        </url>
                    {% elseif route == 'office_brain_search_bundle_browse_category' %}
                        {% for local, categories in info %}
                            {% for cat_id, cat_value in categories %}
                                <url>
                                    <loc>{{ app.request.schemeAndHttpHost ~ path(route,{'_locale':local, 'category_slug': cat_value['slug'] }) }}</loc>
                                    <lastmod>{{ "now" | date() }}</lastmod>
                                </url>
                            {% endfor %}
                        {% endfor %}
                    {% endif %}
                {% endfor %}
            {% elseif group == "information" %}
                {% for page in routes %}
                    <url>
                        <loc>{{ app.request.schemeAndHttpHost ~ path('office_brain_cmsbundle_cmspage_page', {'slug' : page.slug })}}</loc>
                        <lastmod>{{ "now" | date() }}</lastmod>
                    </url>
                {% endfor %}
            {% endif %}
        {% endfor %}
    {% endif %}
</urlset>
