Menu siblings open

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


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:


-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





<?php show_menu2(0SM2_ROOT+2SM2_CURR+2'' ,'[li][a][menu_title]</a>','</li>','',''); 

noname8

#1
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 :


<?php show_menu2(0SM2_ROOT+2SM2_CURR+1,'','[li][a][menu_title]</a>','</li>','',''); 



is_parent wont work because this menu shows current+1 also

fuller 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>




uuhhhhgghg FFFUFUFUFU..problem solved. Posting here always helps!  :mrgreen:
so the SM2_BUFFER was supposed to be without the '

show_menu2(0, SM2_ROOT+2, SM2_CURR+1,SM2_BUFFER,'[li][a][menu_title]</a>','</li>','','');