Hi everyone,
today i have a simple question but i can't find a solution. I have a main menu which only shows the level 0 items (top level). Clear, every top level page could have n..* subpages. If a top level page is selected, i want an output (second menu) like this
HOME   NEWS   > EVENTS < (Main Menu)
--Menu 2--
EVENT 1
> EVENT 2 <
I use this code for Menu 2:
show_menu2(0, SM2_ROOT+1, SM2_START, SM2_ALL | SM2_PRETTY);
But if i select EVENT 1...EVENT 2 etc. the menu vanish. But i want to have the Menu for each Subpage of EVENTS. How to realize this?
Thanks and sorry for the bad english!
			
			
			
				Hi, here my bad english answer ( there is also a german forum  :wink: ).
You should show us the show_menu2 codes for main menu and for the submenu.
			
			
			
				Code for the Main Menu:
$openItem = '<li[if(class=menu-current||class=menu-parent){ class="active"}]><a href="[url]"><span data-hover="Home">[menu_title]</span></a>';
							
show_menu2(
	$aMenu          = 0,
	$aStart         = SM2_ROOT,
	$aMaxLevel      = SM2_START,
	$aOptions       = SM2_ALL | SM_PRETTY,
	$aItemOpen      = $openItem,
	$aItemClose     = '</li>',
	$aMenuOpen      = '<ul class="nav navbar-nav">',
	$aMenuClose     = '</ul>',
	$aTopItemOpen   = false,
	$aTopMenuOpen   = false
)
Code for the Submenu:
function hasSubmenu() {
	$childs = show_menu2(0, SM2_CURR+1, SM2_START, SM2_BUFFER|SM2_ALL|SM2_CURRTREE); 
	return (!empty($childs)) ? true : false;
}
if(hasSubmenu()) {
	$menuItem = '<li[if(class=menu-current||class=menu-parent){ class="active"}]><a href="[url]"><i class="g-mr-10 fa tab__fa fa-arrow-right"></i> [menu_title]</a>';
					
	show_menu2(
		$aMenu          = 0,
		$aStart         = SM2_ROOT+1,
		$aMaxLevel      = SM2_START,
		$aOptions       = SM2_ALL | SM_PRETTY,
		$aItemOpen      = $menuItem,
		$aItemClose     = '</li>',
		$aMenuOpen      = '<ul class="nav nav-pills nav-stacked">',
		$aMenuClose     = '</ul>',
		$aTopItemOpen   = false,
		$aTopMenuOpen   = false
	);
}
It looks like hasSubmenu doesn't work correctly.  :-(
			
			
			
				You can test in 
if(hasSubmenu()) { ...
...
$aStart         = SM2_CURR+1,
			
			
			
				and look here
$aOptions       = SM2_ALL | SM_PRETTY,
should be
$aOptions       = SM2_ALL | SM2_PRETTY,