vendor/nellapp/sdk-bundle/src/Resources/views/Partials/component/breadcrumb/breadcrumb.html.twig line 1

Open in your IDE?
  1. {# TODO replace in all apps then remove #}
  2. {% if breadcrumb is defined and breadcrumb.items|length > 0 %}
  3. {% set itemsCount = breadcrumb.items|length %}
  4. <nav aria-label="breadcrumb"
  5. class="{% if itemsCount > 1 %}nav-breadcrumb{% endif %} {{ breadcrumbNavClasses | default('') }}"
  6. >
  7. <ol class="breadcrumb mb-0 {{ itemsCount > 1 ? 'nellapp-breadcrumb' : 'nellapp-breadcrumb-individual' }} {{ breadcrumbClasses | default('') }}">
  8. {% set previousBtnItem = null %}
  9. {% block root %}{% endblock %}
  10. {% for item in breadcrumb.items %}
  11. <li class="breadcrumb-item {% if not loop.first and loop.last %}active{% endif %}"
  12. aria-current="page"
  13. >
  14. {% set itemTitle = item.title | trans( (item.transArgs | default({})), item.transDomain | default(null) ) %}
  15. {% if item.path is defined and item.path is not empty %}
  16. {% set previousBtnItem = item %}
  17. <a href="{{ item.path }}"
  18. >
  19. {{ itemTitle }}
  20. </a>
  21. {% else %}
  22. {{ itemTitle }}
  23. {% endif %}
  24. </li>
  25. {% endfor %}
  26. </ol>
  27. {% if itemsCount > 1 and previousBtnItem is defined and previousBtnItem is not empty %}
  28. {% if previousBtnItem.path is defined and previousBtnItem.path is not empty %}
  29. <a class="btn-breadcrumb-return"
  30. href="{{ previousBtnItem.path }}"
  31. >
  32. <i class="far fa-arrow-left"></i>
  33. {{ 'component.breadcrumb.button.previous.label'|trans([], 'NellappSDKBundle') }}
  34. </a>
  35. {% endif %}
  36. {% endif %}
  37. </nav>
  38. {% endif %}