{% macro buildRayon(links, niveau, color) %}
    {% import _self as macros %}
    {% for rayon in links %}
        {% if niveau ==2 %}<ul class="subZone">{% endif %}
        <li class="titre niveau{{niveau}} {% if rayon.click %}link{% endif %}" 
            data-niv='{{niveau}}' data-idRayon='{{ rayon.id }}'  
            {% if niveau ==2 %} style="color:#{{ rayon.color? rayon.color:color }}" {% endif %}
        >
            {{ rayon.text }}

        </li>
        {{ macros.buildRayon(rayon.nodes, niveau+1, color) }}
        {% if niveau ==2 %} </ul>{% endif %}
    {% endfor %}
{% endmacro %}

{% import _self as macros %}

<div class="divRayon">
    <ul>
        {% for rayon in listeRayon %}
            <li><div class="titre niveau1 {% if rayon.click %}link{% endif %}" data-niv='1' data-idRayon='{{ rayon.id }}' style="color:#{{rayon.color}}">{{ rayon.text }}</div>
                <div class="zone">
                    {% if rayon.detail or rayon.ctc_nom %}
                        <div id="infoCompl" style="background-color:#{{rayon.color}};">
                            <div>
                                <span>{{'Votre contact Achats'|trad}} :</span>
                                <span>{{ rayon.ctc_nom }}</span>
                                <span>{{ rayon.ctc_tel }}</span>
                            </div>
                            <div>
                                <span>{{'Informations'|trad}} :</span>
                                <span>{{ rayon.detail }}</span>
                            </div>
                        </div>
                    {% endif %}
                    <div class="zone_rayon">
                        {{ macros.buildRayon(rayon.nodes, 2, rayon.color) }}
                    </div>
                </div>
            </li>
        {% endfor %}
    </ul>
</div>
