Community mailing list archives

community@mail.odoo.com

Re: multilevel menu/submenu on website

by
Md. Tanzilul Hasan Khan
- 07/01/2017 03:08:14
I need to change the maxlevels of the menu in the website/static/src/js/website.contentMenu.js file in my custom module :

https://github.com/odoo/odoo/blob/10.0/addons/website/static/src/js/website.contentMenu.js#L216

start: function () {
var r = this._super.apply(this, arguments);
this.$('.oe_menu_editor').nestedSortable({
listType: 'ul',
handle: 'div',
items: 'li',
maxLevels: 2,
toleranceElement: '> div',
forcePlaceholderSize: true,
opacity: 0.6,
placeholder: 'oe_menu_placeholder',
tolerance: 'pointer',
attribute: 'data-menu-id',
expression: '()(.+)', // nestedSortable takes the second match of an expression (*sigh*)
});
return r;
},

I need to change the maxLevels to 3.  Can anyone give me an idea how to do that in the custom module by inheriting it?

Regards.


On Thu, Jun 29, 2017 at 1:10 AM, MD Tanzilul Hasan Khan <ponkhi403@gmail.com> wrote:
Thanks, Axel. I am also looking to modify the Click events to Hover option. So instead of binding the new submenu to click events, I will try to implement mouse hover option. So that menus open automatically. I saw many paid modules which have done that. Have to figure out how. I will dig into it.

Regards.



On Tue, Jun 27, 2017 at 5:20 PM, Axel Mendoza <aekroft@gmail.com> wrote:
Hi Tanzil
Yes, like everything, it's possible, you will need to extend the client side qweb template and widget called both UserMenu and bind the new menus click events using a new custom selector to match the new menu items
Best Regards


On Tue, Jun 27, 2017 at 5:45 AM, MD Tanzilul Hasan Khan <ponkhi403@gmail.com> wrote:
Hello,

Is there any way to have multi level menu on odoo? Currently, there can be only one level submenu. Like - About Us > The Team . Where about us main menu and The team is a submenu of About us.

Is it possible to have three to four level submenu? Like: About Us > The Team > Department > Accounts 

Regards,
Tanzil

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
MD. Tanzilul Hasan Khan.



--
MD. Tanzilul Hasan Khan.