} if ($tm) { $menu->addChild(new JMenuNode(JText::_('MOD_MENU_ADV_EXTENSIONS_TEMPLATE_MANAGER'), 'index.php?option=com_templates', 'class:themes'), true); // $menu->addChild(new JMenuNode(JText::_("MOD_MENU_ADV_EXTENSIONS_TEMPLATE_MANAGER_STYLES"), 'index.php?option=com_templates','list-styles')); $menu->addChild(new JMenuNode(JText::_("MOD_MENU_ADV_EXTENSIONS_TEMPLATE_MANAGER_STYLES"), 'index.php?option=com_templates', 'list-styles'), true); $styles = ModMenuAdvHelper::getStyles(); foreach ($styles as $style) { $menuTitle = $style->title; if ($style->client_id == 1) { $menuTitle .= " [admin]"; } $menu->addChild(new JMenuNode($menuTitle, 'index.php?option=com_templates&task=style.edit&id=' . $style->id)); } $menu->getParent(); $menu->addChild(new JMenuNode(JText::_("MOD_MENU_ADV_EXTENSIONS_TEMPLATE_MANAGER_TEMPLATES"), 'index.php?option=com_templates&view=templates', 'list-templates'), true); $templates = ModMenuAdvHelper::getTemplates(); foreach ($templates as $tmpl) { $menuTitle = $tmpl->name; if ($tmpl->client_id == 1) { $menuTitle .= " [admin]"; } $menu->addChild(new JMenuNode($menuTitle, 'index.php?option=com_templates&view=template&id=' . $tmpl->extension_id)); } $menu->getParent(); $menu->getParent(); } if ($lm) { $menu->addChild(new JMenuNode(JText::_('MOD_MENU_ADV_EXTENSIONS_LANGUAGE_MANAGER'), 'index.php?option=com_languages', 'class:language')); } $menu->getParent(); }