WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Horizontal and vertical menus in multilingual
  • Print
Pages: [1]   Go Down

Author Topic: Horizontal and vertical menus in multilingual  (Read 3943 times)

jsn

  • Guest
Horizontal and vertical menus in multilingual
« on: October 22, 2009, 05:30:04 PM »
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


« Last Edit: October 29, 2009, 03:01:45 AM by jsn »
Logged

LordDarkman

  • Guest
Re: Horizontal and vertical menus
« Reply #1 on: October 22, 2009, 07:46:00 PM »
<?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: [Select]
<?php show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB, &#39;<li>[a][menu_title]</a></li>&#39;,&#39;&#39;,&#39;[if(level>0){}][if(level==0){<ul>}]&#39;,&#39;&#39;);?>
        <?php echo &#39;</ul>&#39;?>
with the code above and remove the top code. After this stile it with CSS.

CU Moritz
Logged

jsn

  • Guest
Re: Horizontal and vertical menus
« Reply #2 on: October 29, 2009, 02:04:16 AM »
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: [Select]


<?php show_menu2(0, $wb->page[&#39;root_parent&#39;], SM2_ALL, SM2_ALL,&#39;<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]-->}]&#39;,&#39;&#39;,&#39;&#39;,&#39;&#39;); ?>

      

 


And this is the syntax for a Vertical Menu:

Code: [Select]
        <?php show_menu2(1, $wb->page[&#39;root_parent&#39;], SM2_ALL, SM2_ALL,&#39;
        
        
[if(level>1){<dd>}]
            [if(
level==1){<dt>}][a][menu_title]</a>
            [if(
level>1){</dd>}]
            [if(
level==1){</dt>}]
    
          &
#39;);?>


« Last Edit: October 29, 2009, 03:00:00 AM by jsn »
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Horizontal and vertical menus in multilingual
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2