src/Hitso/Bundle/CommonBundle/Resources/views/Common/breadcrumbs.html.twig line 1

Open in your IDE?
  1. <div class="main breadcrumb">
        {% if wo_breadcrumbs()|length %}
            {% apply spaceless %}
                <ol id="wo-breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">
                    {% for b in wo_breadcrumbs() %}
                        <li{% if itemClass is defined and itemClass|length %} class="{{ itemClass }}"{% endif %} itemprop="itemListElement"
                                                                                                                 itemscope
                                                                                                                 itemtype="http://schema.org/ListItem">
                            {% if b.url %}
                                {% if b.url|slice(0,1)=='/' %}
                                    {% if b.url|slice(1,1)=='/' %}
                                        {% set burl = app.request.scheme ~':' ~ b.url %}
                                    {% else %}
                                        {% set burl = app.request.scheme ~'://' ~ app.request.httpHost ~ b.url %}
                                    {% endif %}
                                {% elseif app.request.attributes.has('_route') %}
                                    {% set burl = app.request.scheme ~'://' ~ app.request.httpHost ~ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) ~ b.url %}
                                {% endif %}
                            {% elseif app.request.attributes.has('_route') %}
                                {% set burl = app.request.scheme ~'://' ~ app.request.httpHost ~ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) ~ b.url %}
                            {% endif %}
    
                            <meta itemprop="item" content="{{ burl }}"/>
                            {% if b.url and not loop.last %}
                            <a href="{{ burl }}" {% if linkRel is defined and linkRel|length %} rel="{{ linkRel }}"{% endif %}>
                                {% endif %}
                                <span itemprop="name">{% if b.translate is defined and b.translate == true %}{{- b.text | trans(b.translationParameters) -}}{% else %}{{- b.text -}}{% endif %}</span>
                                {% if b.url and not loop.last %}
                            </a>
                            {% endif %}
                            <meta itemprop="position" content="{{ loop.index }}"/>
    
                            {% if separator is defined and separator is not null and not loop.last %}
                                <span class='{{ separatorClass }}'>{{ separator }}</span>
                            {% endif %}
                        </li>
                    {% endfor %}
                </ol>
            {% endapply %}
        {% endif %}
    </div>