WebsiteBaker Community Forum (upd)

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: Cazz on March 06, 2008, 10:33:15 PM

Title: Have a Pulldown as menu
Post by: Cazz on March 06, 2008, 10:33:15 PM
Hi

I have search here but I have not found that I was looking for so now I write my problem instead :)

I like to have a basic pulldown menu form my WB site.

I have add this before the </head>

   <script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>


Then I have install the model show_menu2 and add it to my index.php

there I want to have my menu

<form name="form1" id="form1">
  <select name="menu1" onchange="MM_jumpMenu('parent',this,0)">
<?php         
show_menu2
(0SM2_ROOTSM2_STARTSM2_ALL'<option>[menu_title]''</option>''''');
?>

  </select>
</form>


It show nice but when I dont have any value that tell me where to go nothing happend   :wink:

the basic html look like this


<form name="form1" id="form1">
  <select name="menu1" onchange="MM_jumpMenu('parent',this,0)">
    <option value="test.htm">Test</option>
    <option value="test2.htm">test2</option>
  </select>
</form>


My question is where do write so when I choose in the menu it go to the right page.
Title: Re: Have a Pulldown as menu
Post by: BerndJM on March 07, 2008, 12:23:58 AM
Hi,

just an first idea, give this a try:

<?php         
show_menu2
(0SM2_ROOTSM2_STARTSM2_ALL'<option value="[url]">[menu_title]''</option>''''');
?>


Regards Bernd
Title: Re: Have a Pulldown as menu
Post by: Cazz on March 07, 2008, 04:31:16 PM
ahhh thanks alot, that work great  :lol: :lol: :lol: :lol: :lol:
Title: Re: Have a Pulldown as menu
Post by: Cazz on March 07, 2008, 10:31:44 PM
almost perfect but one problem

I have to somehow make so menu select that page that I'm looking at.
Now it show page one all the time in the menu