In my menu I want to add icons. Now when I look for a way to do this, I found a module called Menu Link Attributes. When I configure this on all my menu items, I can't only get it working when using the link function in twig. Now this is not a the expected way of working. Because in the module I add the class names of a awesome font icon. So I need to find a way to manually place the class in my twig file.

The module settings looks like:

    label: ''
    description: ''

I treid using the {{ item.attributes }} in my menu.html.twig file but this is always empty.

Can someone help me on this? How can I place the class attribute in a custom i tag?

  • Did you figure this out? Trying to do the same. – Progonat Jun 6 '18 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.