WebsiteBaker Community Forum

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 :

Code: [Select]
<?php show_menu2(0SM2_ROOT+2SM2_CURR+1,&#39;&#39;,&#39;[li][a][menu_title]</a>&#39;,&#39;</li>&#39;,&#39;&#39;,&#39;&#39;); 


is_parent wont work because this menu shows current+1 also

fuller code:

Code: [Select]
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 '
Code: [Select]
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:

Code: [Select]
-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



Code: [Select]
<?php show_menu2(0SM2_ROOT+2SM2_CURR+2, &#39;&#39; ,&#39;[li][a][menu_title]</a>&#39;,&#39;</li>&#39;,&#39;&#39;,&#39;&#39;); 
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)