WebsiteBaker Support (2.8.x) > Templates, Menus & Design
Horizontal and vertical menus in multilingual
(1/1)
jsn:
Hi all
I just downloaded the MultiFlex template, and oh surprise, it has already included the multilanguage options; this is good, because I spent several days trying to understand how to set up Multilanguage in the standard template.
I see that Multiflex uses the function show_menu2 to set up menus:
<?php show_menu2(2, SM2_ROOT, SM2_START); ?>
My questions now are:
- how can I show only one group of menus EN or ES, and then whenever the user clicks on a flag it will be switched to the other group. For example if I select "ES" I do not want to see "EN" on the menus,
- Now when I click on English it does not refresh the horizontal menus
- How can I switch the menus from horizontal to vertical?
thanks
LordDarkman:
<?php show_menu2(2, SM2_ROOT+1, SM2_START); ?>
To switch the menu you have to include the call into an other section. If your useing multiflex5 replace
--- Code: ---<?php show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB, '<li>[a][menu_title]</a></li>','','[if(level>0){}][if(level==0){<ul>}]','');?>
<?php echo '</ul>'?>
--- End code ---
with the code above and remove the top code. After this stile it with CSS.
CU Moritz
jsn:
Because it is a multilingual web site it must show the sub-menus corresponding to the corresponding language menu link, in this case ES or EN.
So here is the syntax for the horizontal menu to show only sub-menus from one laqnguage, and then sub-submenus t:
--- Code: ---
<?php show_menu2(0, $wb->page['root_parent'], SM2_ALL, SM2_ALL,'<li>[a][menu_title]
[if(class==menu-expand){<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><ul>}]
[if(class!=menu-expand){</a>}]
[if(class!=menu-last){</li>}]
[if(class==menu-last){</li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]-->}]','','',''); ?>
--- End code ---
And this is the syntax for a Vertical Menu:
--- Code: --- <?php show_menu2(1, $wb->page['root_parent'], SM2_ALL, SM2_ALL,'
[if(level>1){<dd>}]
[if(level==1){<dt>}][a][menu_title]</a>
[if(level>1){</dd>}]
[if(level==1){</dt>}]
');?>
--- End code ---
Navigation
[0] Message Index
Go to full version