item.attribute('icon') is not defined, we need to call item.extra('icon'). Otherwise the icon will not be populated to the nav entry which is used together with the on_top-option
@@ -27,7 +27,7 @@
{% spaceless %}
{% if item.extra('on_top') is defined and not item.extra('on_top') %}
{% set translation_domain = item.extra('translation_domain', 'messages') %}
- {% set icon = item.attribute('icon')|default(item.level > 1 ? '<i class="fa fa-angle-double-right" aria-hidden="true"></i>' : '') %}
+ {% set icon = item.extra('icon')|default(item.level > 1 ? '<i class="fa fa-angle-double-right" aria-hidden="true"></i>' : '') %}
{% else %}
{% set icon = item.extra('icon') %}
{% endif %}