Servoy / svyNavigation

Navigation extension for Servoy applications
MIT License
0 stars 0 forks source link

Better way for long Drop down at the navbar #8

Closed juanetec closed 4 years ago

juanetec commented 4 years ago

Hi, I am looking for a better solution for the drop down at the navbar. In smart we have the popupmenu that we can nested with "popupmenu.addMenu.". I know that the bootstrap Drop down cannot do it. I saw that option http://bootstrapessentials.com/fulldocs/components/navbar/navbar-submenu/ but I don't know how to implementent it in the {CustomType}.

I can show a screen shot of may case is better to understand what I am trying to say: Image 7

Thanks Un Saludo

Juan Ramírez

seanthomasdevlin commented 4 years ago

Hi Juan,

Yes it is possible to do nested menus on the NavBar component that is included in the navigation module. Use the subMenuItems property.

In the context of the navigation module, you can override the loadNavbarItems method. There are instructions on the svyNavigation wiki.

juanetec commented 4 years ago

Hi Sean, sorry about my another issue maybe I did not explain clearly , what you have explained is that what I do. But what I pretend is to nested more than one level. In this example I have only one level Can I have the level 6.2.1? on the next code example. var menuItems = []; menuItems.push({itemId: '6', text: 'Menu', position: 'RIGHT', tooltip: 'A submenu', subMenuItems: [{itemId: '6.1', text: 'Action'}, {itemId: '6.2', text: 'More action'}, {isDivider: true}, {itemId: '6.3', text: 'Last action'}]}); elements.navbar.brandText = 'Accounting'; elements.navbar.setMenuItems(menuItems);

I found a boostrap navbar submenu example at that link and they solve it with StyleClass Image 2

https://bootstrapessentials.com/fulldocs/components/navbar/navbar-submenu/

Thanks Un Saludo

Juan Ramírez

paronne commented 4 years ago

Hi Juan,

the svyNavigation template uses the Navbar component for top navigation, which indeed allow 1 sub-level. You can find documentation on the Navbar at https://github.com/Servoy/bootstrapextracomponents/wiki/Navbar