The Joomla! Forum ™



Forum rules


Please use the official Bug Tracker to report a bug: http://joomlacode.org/gf/project/joomla ... er_id=8103



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sat Jul 31, 2010 6:24 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 02, 2006 6:11 pm
Posts: 85
Location: Schwerin, Germany
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:
Code:
$text = $lang->hasKey($component->title) ? JText::_($component->title) : $component->alias;

   if (!empty($component->submenu))
   {
      // This component has a db [drive] 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));
   }


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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 



Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group