Open xmontero opened 6 years ago
Will this be also available in 1.3?
@xmontero do you need it? Maybe it could be backported. But the idea is get rid soon of 1.3.x series and use as soon as possible 2.x and 3.x in future
Well, I guess that changing the major means it breaks compatibility. I have a huge dependency on the bundle and I'm not ready to afford the resources to "migrate from 1.3 to 2.0" if it is "very different" to consume.
Breaking my admin panel say during 1 week could kill my business.
Is there any documentation on "migrating from 1.3 to 2.0". If it's "easy" I can try to move to 2.0.
As an example, large projects migrating from symfony 1 to 2 took 1 to 2 years of rewriting, while porting from symfony 2 to 3 was a matter of changing some directories and done. With this, I mean it's very "unpredictable" how much time it'll take to tackle a major-version change, unless it's clear where to touch. Symfony has had this in consideration and made any other "major" migration much simpler. Passing from 3 to 4 seems "trivial".
What's the complexity of moving avanzu from 1.3 to 2.0? Any documentation on that?
@xmontero I implemented the feature by overwriting the macros.html.twig
file. It's been a while and I'm not sure if this is the right way of doing this but here you go
Just copy the macros.html.twig
file into app/Resources/AvanzuAdminThemeBundle/views/layout/macros.html.twig
and replace the menu_item
macro. Hope this helps.
@xmontero please confirm if this is working for you:
// Declare a empty array
$menuItems = [];
// Declare the MenuItemModels
$level1 = new MenuItemModel( 'level1', 'Level 1', 'form_submission_bulk_display_change_state_form', [], 'fa fa-star' );
$level2 = new MenuItemModel( 'level2', 'Level 2', 'form_submission_bulk_display_change_state_form', [], 'fa fa-star' );
// Add the child
$level1->addChild( $level2 );
// Add as item in menu.
$menuItems = [$level1];
Check that you don't have duplicated identifiers (there are a bug with collision name identifiers)
In the AdminLte demo here https://adminlte.io/themes/AdminLTE/index2.html I can see multilevel menus.
Instead, when I try to do them in avanzu, I can't display them:
If I do this (only 1 level):
I get this:
If I do this (2 levels), I'd expect that the menu "Level 1" contains a caret to open a submenu named "Level 2".
Instead, I get this:
And there's no toggle there to open/close, as it'd be expected according to the AdminLte demo:
Question: How can I code submenus in a multilevel menu?