Joomla! Admin submenu module for creating nested submenus
What is it?
Just a simple Joomla 1.7 back-end nested submenu module. It uses the same syntax as the Joomla module Admin Submenu to create a drop-down menu. This will only go as far as 3 nested menus. You can go further if you modify the Son of Suckerfish CSS.
Provide a programically easy way to create submenu system to display in the Joomla submenu position.
- Change CSS to mimic native Joomla submenu.
- Adhear to selected attribute and hidemainmenu.
- Run the links through JRoute.
- Probably a few other things that I've overlooked.
How do I use it?
- First go to the admin Module Manager
- Click Admin Nested Submenu
- Set Position to submenu
- Change the status to published
- Save & close.
In your component or helper file:
jimport('corephp.html.nestedsubmenuhelper'); $menu = NestedSubMenuHelper::getInstance(); $menu->addEntry( 'Home', 'index.php?option=com_mycomponent', $vName == 'home', array( // Here is the tricky part. This is an array of arrays that are your nested menus. array( 'Settings', 'index.php?option=com_mycomponent&view=settings', $vName == 'home' ), // Another Array if you have more dropdowns you want to add ), );
How do I build it?
Use phing to create install package and install it on your site.
Phing: If you don't have Phing installed, get it here. From the repository root:
phing -f build/build.xml
That should create an installable zip in your build dir.