hasIdentity()) { $aliasArray = explode('/', Qs_SiteMap::findFirst('', 'fullAlias')); $rootAlias = array_shift($aliasArray); $menuData = Qs_SiteMap::getFromDb(); foreach ($menuData[$rootAlias]['sub'] as $pageAlias => $page) { if ($page['handler'] != 'user' || $page['system'] == 'y' ) { unset($menuData[$rootAlias]['sub'][$pageAlias]); } } $this->_addProtectedAreaMenu($menuData[$rootAlias]); } return parent::_beforeDisplay(); } protected function _addProtectedAreaMenu($menuData) { if (!empty($menuData['sub'])) { $this->addItem( array( 'tpl' => $this->getTemplate('protected-area-menu.tpl'), 'data' => $menuData['sub'] ), 'LEFT_ITEMS' ); } return $this; } }