If you are using KnpMenu
> 2.1, you can directly use this feature:
- PR: KnpLabs/KnpMenu#228
- Doc: https://github.com/KnpLabs/KnpMenu/blob/master/doc/02-Twig-Integration.markdown#functions
You can use it like this:
<ol class="breadcrumb">
{% for breadcrumb_item in knp_menu_get_breadcrumbs_array(knp_menu_get_current_item('main')) %}
{% if not loop.last %}
<a href="{{%20breadcrumb_item.uri%20}}">{{ breadcrumb_item.label }}</a>