diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2018-04-30 22:15:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-30 22:15:22 +0300 |
commit | 8d9d5ed8667f9b39560be9bc1db8d09cfe373fba (patch) | |
tree | 32b526dccb3bd91d0e8f19a6134a31517f6b6c9b /plugins/CoreHome/templates | |
parent | 8a76f44f2670921029d6733c9560c1863c99dba6 (diff) |
Add possibility to specify an icon and onclick handler for submenu items (#12791)
Diffstat (limited to 'plugins/CoreHome/templates')
-rw-r--r-- | plugins/CoreHome/templates/_menu.twig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/CoreHome/templates/_menu.twig b/plugins/CoreHome/templates/_menu.twig index a6f72eb3ef..eb2d8a0ead 100644 --- a/plugins/CoreHome/templates/_menu.twig +++ b/plugins/CoreHome/templates/_menu.twig @@ -27,7 +27,13 @@ > <a class="item" tabindex="5" target="_self" title="{{ urlParameters._tooltip|default('')|translate|e('html_attr') }}" - href="index.php?{{ urlParameters._url|urlRewriteWithParameters|slice(1) }}"> + {% if urlParameters._onclick is defined and urlParameters._onclick %} + onclick="{{ urlParameters._onclick|e('html_attr') }};return false;" + {% endif %} + {% if urlParameters._url %} + href="index.php?{{ urlParameters._url|urlRewriteWithParameters|slice(1) }}" + {% endif %}> + {% if urlParameters._icon is defined and urlParameters._icon %}<span class="icon {{ urlParameters._icon|e('html_attr') }}" style="margin-right: 5px;"></span>{% endif %} {{ name|translate }} </a> </li> |