templates/_menu/breadcrumbs.html.twig line 1

Open in your IDE?
  1. {% set children = [] %}
  2. {% for breadcrumb_item in item.children %}
  3.     {% set children = children|merge([breadcrumb_item]) %}
  4. {% endfor %}
  5. {% set route = app.request.get('_route') %}
  6. {% if 'profile_list.list_by_station' in route %}
  7.     {% set page = current_listing_page() %}
  8.     {% if page and page.totalCount > 0 %}
  9.         {% set children = children|merge([{label: 'Страница ' ~ page.currentPage ~ ' из ' ~ (page.totalCount / page.currentLimit)|round(0, 'ceil')}]) %}
  10.     {% endif %}
  11. {% endif %}
  12. {% if item.children|length > 1 %}
  13.     <ol class="breadcrumb">
  14.         {% for breadcrumb_item in children %}
  15.             {% if not loop.last %}
  16.                 <li class="breadcrumb-item"><a href="{{ breadcrumb_item.uri }}">{{ breadcrumb_item.label }}</a></li>
  17.             {% else %}
  18.                 <li class="breadcrumb-item active" aria-current="page">{{ breadcrumb_item.label }}</li>
  19.             {% endif %}
  20.         {% endfor %}
  21.     </ol>
  22. {% endif %}