Index: typo3/sysext/cms/tslib/class.tslib_menu.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_menu.php (revision 7016) +++ typo3/sysext/cms/tslib/class.tslib_menu.php (working copy) @@ -1452,6 +1452,13 @@ */ function isItemState($kind,$key) { $natVal=0; + + if($this->mconf['resolveActiveShortcut']) { + $uid = $this->resolveLinkUid($this->menuArr[$key]); + } else { + $uid = $this->menuArr[$key]['uid']; + } + if ($this->menuArr[$key]['ITEM_STATE']) { // If any value is set for ITEM_STATE the normal evaluation is discarded if (!strcmp($this->menuArr[$key]['ITEM_STATE'],$kind)) {$natVal=1;} } else { @@ -1460,19 +1467,19 @@ $natVal = $this->menuArr[$key]['isSpacer']; break; case 'IFSUB': - $natVal = $this->isSubMenu($this->menuArr[$key]['uid']); + $natVal = $this->isSubMenu($uid); break; case 'ACT': - $natVal = $this->isActive($this->menuArr[$key]['uid'], $this->getMPvar($key)); + $natVal = $this->isActive($uid, $this->getMPvar($key)); break; case 'ACTIFSUB': - $natVal = $this->isActive($this->menuArr[$key]['uid'], $this->getMPvar($key)) && $this->isSubMenu($this->menuArr[$key]['uid']); + $natVal = $this->isActive($uid, $this->getMPvar($key)) && $this->isSubMenu($uid); break; case 'CUR': - $natVal = $this->isCurrent($this->menuArr[$key]['uid'], $this->getMPvar($key)); + $natVal = $this->isCurrent($uid, $this->getMPvar($key)); break; case 'CURIFSUB': - $natVal = $this->isCurrent($this->menuArr[$key]['uid'], $this->getMPvar($key)) && $this->isSubMenu($this->menuArr[$key]['uid']); + $natVal = $this->isCurrent($uid, $this->getMPvar($key)) && $this->isSubMenu($uid); break; case 'USR': $natVal = $this->menuArr[$key]['fe_group']; @@ -1483,6 +1490,22 @@ return $natVal; } + /** + * Resolves the final link uid of the given page, if page is of type shortcut + * + * @param array page object. + * @return integer Returns the uid of the linked page + */ + protected function resolveLinkUid($page) { + if ($page['doktype'] == 4) { + $shortcutPage = $GLOBALS['TSFE']->getPageShortcut($page['shortcut'],$page['shortcut_mode'],$page['uid']); + if (is_array($shortcutPage) && $shortcutPage['uid']) { + return $shortcutPage['uid']; + } + } + return $page['uid']; + } + /** * Creates an access-key for a TMENU/GMENU menu item based on the menu item titles first letter *