Open lossendae opened 14 years ago
splittingred submitted:
Not without some serious reworking to the query. I'll look into it post-xpdo db work.
lossendae submitted:
I made some changes to header.php controller to add current class to main and submenus by using the following code:
cacheManager->get('mgr/menus/'.$modx->getOption('manager_language',null,$modx->getOption('cultureKey',null,'en'))); if ($menus == null) { $menu = $modx->newObject('modMenu'); $menus = $menu->rebuildCache(); unset($menu); } $output = ''; $order = 0; $current = $_GET['a']; $showDescriptions = (boolean)$modx->getOption('topmenu_show_descriptions',null,true); foreach ($menus as $menu) { $childrenCt = 0; $class= ''; $childTpl= ''; if (!empty($menu['permissions'])) { $permissions = array(); $exploded = explode(',', $menu['permissions']); foreach ($exploded as $permission) $permissions[trim($permission)]= true; if (!empty($permissions) && !$modx->hasPermission($permissions)) continue; } if (!empty($menu['children'])) { $childTpl .= ''."\n"; } $menuTpl = '
And to navbar.tpl to allow class for the first element too:
Fully degradable with current manager.
lossendae created Redmine issue ID 10788
Would it be possible to add current classes to the top menu (for the general section menu and childrens). It will allow to know in which section we are wihtout guessing and facilitate custom manager interface using tabs for top menu layout like evo.