WebsiteBaker Support (2.8.x) > Templates, Menus & Design
Menu siblings open
(1/1)
noname8:
Hello!
I have problem that is really bugging me!
I need to make the sub menu's div / ul to be visible only when it's needed.
This is to make the ul around it to have special css.
How can I check without echoing the menu (now it does) that will this menu be visible :
--- Code: ---<?php show_menu2(0, SM2_ROOT+2, SM2_CURR+1,'','[li][a][menu_title]</a>','</li>','','');
--- End code ---
is_parent wont work because this menu shows current+1 also
fuller code:
--- Code: ---if ($menu_needed) echo '<ul class="menu2">';
else echo '<ul class="hiddenclass">';
show_menu2(0, SM2_ROOT+2, SM2_CURR+1,'','[li][a][menu_title]</a>','</li>','','');
?>
</ul>
--- End code ---
uuhhhhgghg FFFUFUFUFU..problem solved. Posting here always helps! :mrgreen:
so the SM2_BUFFER was supposed to be without the '
--- Code: ---show_menu2(0, SM2_ROOT+2, SM2_CURR+1,SM2_BUFFER,'[li][a][menu_title]</a>','</li>','','');
--- End code ---
noname8:
If I have page with 2 level of sub pages
how can i make the sub pages also be visible when not seeing that sibling:
--- Code: ----hidden1
-hidden2
-hidden3(this one clicked to show menu2)
-page a (this one clicked but..)
-page b
--page b1 (..these are still visible. Now I cannot make them visible)
--page b2
-page c
-hidden4
--- End code ---
--- Code: ---<?php show_menu2(0, SM2_ROOT+2, SM2_CURR+2, '' ,'[li][a][menu_title]</a>','</li>','','');
--- End code ---
noname8:
Anyone ?
Swon:
you can see how to make a submenu, there is only showing if needed in my new template.
https://forum.WebsiteBaker.org/index.php/topic,16968.0.html
Navigation
[0] Message Index
Go to full version