By default the custom component can be seen under 'Extensions' menu at admin side. But how can I create my own menu at the top near to 'Extensions' menu like 'My Component' and show sub menu links under that?

  • Are you talking about the same thing Community Builder do? If so, I was initially going to recommend looking through their code, but having looked at it myself I think differently :/
    – Lodder
    Commented Apr 14, 2015 at 17:32
  • @Lodder yes, you are correct. I am expecting a similar module. I refer the CB module and I see they have lots of code to achieve it. I thought there could be a simpler way to do and that's the reason of this question. Commented Apr 15, 2015 at 21:28

3 Answers 3


We can develop an admin side component with the below code snippet.


$input   = JFactory::getApplication()->input;
$menu    = new JAdminCSSMenu;
$enabled = $input->getBool('hidemainmenu') ? false : true;

// Render the module layout
require JModuleHelper::getLayoutPath('mod_custommenu', $params->get('layout', 'default'));

The above code creates a menu object and load the default.php


$document = JFactory::getDocument();
$direction = $document->direction == 'rtl' ? 'pull-right' : '';
require JModuleHelper::getLayoutPath('mod_custommenu', $enabled ? 'default_enabled' : 'default_disabled');
$menu->renderMenu('menu', $enabled ? 'nav ' . $direction : 'nav disabled ' . $direction);

The above code will determine how the menu to be displayed. Either enabled or disabled.


$menu->addChild(new JMenuNode(JText::_('Menu'), null, 'disabled'));

The above code is just to display the greyed menu in case of disabled.


$menu->addChild(new JMenuNode(JText::_('Menu'), '#'), true);
$menu->addChild(new JMenuNode(JText::_('Menu1'), '', 'class:menu1'), 1);
  $menu->addChild(new JMenuNode(JText::_('Menu2'), '#', 'class:menu2'));

The above code will add the menu and menu items.

  • Very complete and well explained, works great, thank you!
    – jackJoe
    Commented Jun 24, 2016 at 15:25

You will need to override the admin template to do this.

There is a pretty detailed article here that describes how to do this. It was written for Joomla 2.5 but should also work for Joomla 3.0


  • I'm pretty sure there must be an other way: Virtuemart 3 appears in the top menu after install.
    – Khaarkh
    Commented Apr 15, 2015 at 7:08
  • They can do that by simply adding a template override during installation Commented Apr 16, 2015 at 8:31

I was doing it myself but now I use https://extensions.joomla.org/extension/admin-menu-manager

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.