I got a bit further solving this issue adjusting web2py-bootstrap4.js $(function() { $(".navbar-nav ul.dropdown-menu").each(function() { var toggle = jQuery(this).parent(); if (toggle.parent().hasClass("navbar-nav")) { toggle.attr("data-w2pmenulevel", "l0") toggle.addClass("nav-item dropdown"); toggle.children("a") .addClass("nav-link dropdown-toggle") .append('<span class="caret"> </span>') .attr("data-toggle", "dropdown"); var element = jQuery(this).children(); element.addClass("dropdown-item") } else { toggle.addClass("dropdown-submenu").removeClass("dropdown"); }; }); });
These adjustments render the following menu: > <ul class="navbar-nav"> > <li class="nav-item web2py-menu-first"><a class="nav-link"></a></li> > <li class="dropdown nav-item" data-w2pmenulevel></li> > <a class="nav-link dropdown-toggle"></a> > <div class="dropdown-menu"> > <a class="dropdown-item"></a> > </div> > </li> > </ul> > The issue left is the bit in red, I haven't been able to figure out how to add the class to the A element. Furthermore I don't understand why web2py reverses the order of the bit in orange, no matter the order in which I write the code, I always get class="dropdown nav-item" instead of class="nav-item dropdown" I hope anyone can help me solve the last bit of this problem. Kind regards, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/07818cbf-aa5c-4c24-ab08-2bde763a7d72%40googlegroups.com.