solid_theme-1.0.0/templates/macros/macro.menu-link.tpl.twig
templates/macros/macro.menu-link.tpl.twig
{# renders a menu link extraclass is a optional string with classes to be set on the <A tag we asume that the active class is on the element above the link (<li>) #} {% macro link(menuitem,extraclass) %} {% spaceless %} {#{{ menuitem['#localized_options']['fragment'] }}#} <a {% if extraclass|default(false) %}class="{{ extraclass }}"{% endif %} href="{% if menuitem['#href'] == 'menu-dummy' %} # {% else %}{{ (menuitem['#href'] == 'menu-dummy')? '#' : url(menuitem['#href']) }} {% endif %}" {% if (menuitem['#href'] matches '/^(http|https|www)/i' )%} target="_blank" {% endif %} >{{ menuitem['#title'] }}</a> {% endspaceless %} {% endmacro %}