WebsiteBaker Community Forum (upd)

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: noname8 on December 28, 2009, 09:22:56 PM

Title: Menu siblings open
Post by: noname8 on December 28, 2009, 09:22:56 PM
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>','','');



Title: Re: Menu check needed
Post by: noname8 on December 29, 2009, 05:59:36 PM
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>','',''); 
Title: Re: Menu siblings open
Post by: noname8 on January 31, 2010, 08:03:27 PM
Anyone ?
Title: Re: Menu siblings open
Post by: Swon on February 01, 2010, 12:59:34 PM
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 (https://forum.websitebaker.org/index.php/topic,16968.0.html)