Reputation: 666
I would like to use my own template to create my custom website menu with Knp Menu.
I find how to specify a different template, using this:
{{ knp_menu_render('main', {'template' : 'custom_knp_menu.html.twig'}) }}
But now, I have no idea how to retrieve all the item list inside the template. I guess they are defined in some place but I can't find them.
Thanks for your help.
Upvotes: 1
Views: 550
Reputation: 666
I found the parameter I was looking for was {{ item }}
.
I used this on top of the templates to find out.
{% for key, value in _context %}
<li>{{ key }}</li>
{% endfor %}
Upvotes: 1