Admin Menu: Component Section
Posted: Sat Jul 31, 2010 6:24 pm
Hi everyone,
I guess this is a bug. At least I don't understand the logic behind this behaviour.
When I install a new J 1.6 component a new admin menu item is automatically created, based on my manifest entries. So I was wondering, why Joomla always puts the menu-item-alias in the menu and NOT the menu-item-title. So I took a look in the code, and I found this in
administrator/modules/mod_menu/tmpl/default_enabled.php in line 174:
Why does it use themenu-item alias when there is no Translation found for the menu-item-title?
That doesn't make any sense to me.
I guess this is a bug. At least I don't understand the logic behind this behaviour.
When I install a new J 1.6 component a new admin menu item is automatically created, based on my manifest entries. So I was wondering, why Joomla always puts the menu-item-alias in the menu and NOT the menu-item-title. So I took a look in the code, and I found this in
administrator/modules/mod_menu/tmpl/default_enabled.php in line 174:
Code: Select all
$text = $lang->hasKey($component->title) ? JText::_($component->title) : $component->alias;
if (!empty($component->submenu))
{
// This component has a db driven submenu.
$menu->addChild(new JMenuNode($text, $component->link, $component->img), true);
foreach ($component->submenu as $sub)
{
$text = $lang->hasKey($sub->title) ? JText::_($sub->title) : $sub->alias;
$menu->addChild(new JMenuNode($text, $sub->link, $sub->img));
}
$menu->getParent();
}
else {
$menu->addChild(new JMenuNode($text, $component->link, $component->img));
}
That doesn't make any sense to me.