User tests: Successful: Unsuccessful:
Backend menus markup was not overridable.
I moved the JMenuNode (that was inside the administrator mod_menu) to the cms library and improved it to manage attributes. This way the library is available for every extension.
I also added JLayouts for the common used bootstrap menus:
Also created two joomla basic menu layouts.
Now administrator mod_menu default layout displays:
$layout = new JLayoutFile('bootstrap.menu.dropdown');
echo $layout->render($menu);
That file can be easily overriden for example in hathor to use:
$layout = new JLayoutFile('joomla.menu');
echo $layout->render($menu);
Anywhere in the site we now can display a menu.
$menu = new JMenuParent;
$submenu = new JMenuNode('Hello world', 'index.php');
$submenu->addChild(new JMenuNode('Hello2 world', 'index.php'));
$submenu->addChild(new JMenuNode('Hello3 world', 'index.php'));
$menu->addChild($submenu);
$menu->addChild(new JMenuNode('Hello4 world', 'index.php'));
$layout = new JLayoutFile('bootstrap.menu.tabs');
echo $layout->render($menu);
Thanks for reviewing it Michael!
As I want to do this in the right way I'll search the hathor icons and learn about unit tests before add a tracker item for this.
Hi Roberto,
What's the status on this one? Looks like it's still in sync with master, surprisingly :)
Please can you create a corresponding joomlacode tracker item for this - thanks
I'm closing this hoping to be able to contribute it again in the future.
My only complaint about this is that we lose the possibility to use icons in Hathor's menu again (this came back after a recent commit). Aside from that, it looks great and I'm not seeing any loss of functionality.
Since we're moving classes to the CMS libraries, would it be possible to throw together some quick unit tests? Not a show stopper to me, but I'd like to improve our test coverage as we go