Skip to content

Commit

Permalink
Merge pull request #1 from maldoinc/maldoinc-patch-menu-target
Browse files Browse the repository at this point in the history
Added option to add target attribute to menu links
  • Loading branch information
maldoinc committed Jan 29, 2016
2 parents f3f0d77 + 142531f commit af018e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Resources/views/default/menu.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
item.type == 'empty' ? '#' : ''
%}

<a href="{{ path }}">
<a href="{{ path }}"
{% if item.type == 'link' and item.target is defined and item.target is not empty %}target="{{ item.target }}{% endif %}"
>
{% if item.icon is not empty %}<i class="fa {{ item.icon }}"></i>{% endif %}
{{ item.label|trans }}
{% if item.children|default([]) is not empty %}<i class="fa fa-angle-left pull-right"></i>{% endif %}
Expand Down

0 comments on commit af018e0

Please sign in to comment.