Added menu item name as attribute
authorMarcel Werk <burntime@woltlab.com>
Mon, 8 Dec 2014 22:49:47 +0000 (23:49 +0100)
committerMarcel Werk <burntime@woltlab.com>
Mon, 8 Dec 2014 22:49:47 +0000 (23:49 +0100)
com.woltlab.wcf/templates/footerMenu.tpl
com.woltlab.wcf/templates/mainMenu.tpl
com.woltlab.wcf/templates/mainMenuSubMenu.tpl

index 22548bd883ee9db8b876182be13291a38d078527..e2d78586e2d9d506df7e419940b4d205bf64308e 100644 (file)
@@ -1,7 +1,7 @@
 {if $__wcf->getPageMenu()->getMenuItems('footer')|count > 0}
        <ul class="navigationMenuItems">
                {foreach from=$__wcf->getPageMenu()->getMenuItems('footer') item=menuItem}
-                       <li><a href="{$menuItem->getProcessor()->getLink()}">{lang}{$menuItem->menuItem}{/lang}{if $menuItem->getProcessor()->getNotifications()} <span class="badge badgeUpdate">{#$menuItem->getProcessor()->getNotifications()}</span>{/if}</a></li>
+                       <li data-menu-item="{$menuItem->menuItem}"><a href="{$menuItem->getProcessor()->getLink()}">{lang}{$menuItem->menuItem}{/lang}{if $menuItem->getProcessor()->getNotifications()} <span class="badge badgeUpdate">{#$menuItem->getProcessor()->getNotifications()}</span>{/if}</a></li>
                {/foreach}
        </ul>
 {/if}
index 820d103656f105e1e122e9a1b562e9214ff89d7d..9b709fb79d054e84012e6b6b642951ae5e8f5f77 100644 (file)
@@ -2,7 +2,7 @@
        <nav id="mainMenu" class="mainMenu jsMobileNavigation" data-button-label="{lang}wcf.page.mainMenu{/lang}">
                <ul>
                        {foreach from=$__wcf->getPageMenu()->getMenuItems('header') item=menuItem}
-                               <li{if $__wcf->getPageMenu()->getActiveMenuItem() == $menuItem->menuItem} class="active"{/if}>
+                               <li{if $__wcf->getPageMenu()->getActiveMenuItem() == $menuItem->menuItem} class="active"{/if} data-menu-item="{$menuItem->menuItem}">
                                        <a href="{$menuItem->getProcessor()->getLink()}">{lang}{$menuItem->menuItem}{/lang}{if $menuItem->getProcessor()->getNotifications()} <span class="badge badgeUpdate">{#$menuItem->getProcessor()->getNotifications()}</span>{/if}</a>
                                        {if $__wcf->getPageMenu()->getMenuItems($menuItem->menuItem)|count > 0 && $__wcf->getPageMenu()->getActiveMenuItem() == $menuItem->menuItem}
                                                <ul class="invisible">
index afe520a9dca8016edcfd5636442600adbcff1165..740684eab43400cc88e167da41d64468e1e8fcea 100644 (file)
@@ -2,7 +2,7 @@
        {if $__wcf->getPageMenu()->getMenuItems($menuItem->menuItem)|count > 0 && $__wcf->getPageMenu()->getActiveMenuItem() == $menuItem->menuItem}
                <ul class="navigationMenuItems">
                        {foreach from=$__wcf->getPageMenu()->getMenuItems($menuItem->menuItem) item=subMenuItem}
-                               <li{if $__wcf->getPageMenu()->getActiveMenuItem(1) == $subMenuItem->menuItem} class="active"{/if}><a href="{$subMenuItem->getProcessor()->getLink()}"><span>{lang}{$subMenuItem->menuItem}{/lang}</span></a>{if $subMenuItem->getProcessor()->getNotifications()} <span class="badge badgeUpdate">{#$subMenuItem->getProcessor()->getNotifications()}</span>{/if}</li>
+                               <li{if $__wcf->getPageMenu()->getActiveMenuItem(1) == $subMenuItem->menuItem} class="active"{/if} data-menu-item="{$subMenuItem->menuItem}"><a href="{$subMenuItem->getProcessor()->getLink()}"><span>{lang}{$subMenuItem->menuItem}{/lang}</span></a>{if $subMenuItem->getProcessor()->getNotifications()} <span class="badge badgeUpdate">{#$subMenuItem->getProcessor()->getNotifications()}</span>{/if}</li>
                        {/foreach}
                        {event name='items'}
                </ul>