- Issue created by @Nelo_Drup
- 🇺🇸United States banoodle San Francisco, CA
I just want to chime in here in case it is helpful to others.
We added a field_link_icon field to our menu links using the menu_item_fields module.
We want to display this icon in tb_megamenu along with the menu links.
As noted in this issue, there doesn't appear to be a way through the UI/config to do this.
We were able to achieve this by adding the following to our theme's tb-megamenu-item.html.twig (and installing the twig_tweak → module):
{% set media_id = item.link.entity.field_link_icon.0.target_id %} {{ drupal_image(media_id, 'thumbnail', {alt: ''}) }}
Thanks to @nkarhoff for helping me with this solution!