WebsiteBaker Support (2.8.x) > Templates, Menus & Design
Showmenu 2 Bootstrap 3.3 menu code
rumen:
It is below the footer, it shows Level=0 and there is no any chage in the menu. Never mind. It works, that's most important.
jacobi22:
it's simple, if your compare both menu's in the source code
the target: ul class="sub-menu" ++ a-href use # instead of the url
i try to explain and hope you can understand this
--- Quote ---$open = '<li class="[if(class=menu-current||class=menu-parent){active}] [if(class==menu-expand){dropdown}]">
[if(class==menu-expand){<a href="[url]" class="dropdown-toggle" data-toggle="dropdown">[menu_title]<b class="caret"></b></a>}
else {<a href="[url]">[menu_title]</a>}]';
--- End quote ---
blue = the condition - if class == menu-expand - means: if there are child's at this menu point
red: the reaction, if this condition is true - <a href="[url]" class="dropdown-toggle" data-toggle="dropdown">
you need here a simple <a href="#"> instead of the red line like
--- Code: ---$open = '<li class="[if(class=menu-current||class=menu-parent){active}] [if(class==menu-expand){dropdown}]">
[if(class==menu-expand){<a href="#">[menu_title]<b class="caret"></b></a>}
else {<a href="[url]">[menu_title]</a>}]';
--- End code ---
next point
--- Quote ---$aMenuOpen = '<ul class="[if(level==0){nav navbar-nav} else {dropdown-menu}]">',
--- End quote ---
red: the condition - if level == 0 - means: if you're in the root of your page tree
red: answer, if the condition is true (level 0 only)
green: answer, if condition is false (level 1 and higher)
what you need, is a different class (sub-menu) instead of dropdown-menu.
Solution:
--- Code: ---$aMenuOpen = '<ul class="[if(level==0){nav navbar-nav} else {sub-menu}]">',
--- End code ---
Result: works for me ;-)
rumen:
Thanks buddy! With this code really wors fine. Thank you onse again!
macsmet:
Hi there,
Is it correct that a bootstrap menu (like mentioned here) doesn't open a URL to a new page?
Even when you set in in WB to open the link with _blank?
Greetings,
William
dbs:
Hi, if you need target you have to add it like so
--- Code: ---<a href="[url]" target="[target]" ...
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version