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.9 R24 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 »
  • menu in dropdown-list
  • Print
Pages: [1]   Go Down

Author Topic: menu in dropdown-list  (Read 6276 times)

peturkirke

  • Guest
menu in dropdown-list
« on: November 05, 2008, 12:07:44 AM »
Is it possible to show the menu-items in a dropdown list (<select> <option value...) ?

and how do i do it ?
Logged

vyni

  • Guest
Re: menu in dropdown-list
« Reply #1 on: November 05, 2008, 01:18:51 AM »
Hi,
jo it is possible - just add it to the template where it should appear.

this is the code

Code: [Select]
<form name="jump">
<select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">
<?php
show_menu2
(
        
$aMenu          = 0,
        
$aStart         = SM2_ROOT,
        
$aMaxLevel      = SM2_ALL,
        
$aOptions       = SM2_ALL,
         
$aItemOpen      = &#39;<option value="[url]">[menu_title]</option>&#39;,
        
$aItemClose     = &#39;&#39;,
        
$aMenuOpen      = &#39;&#39;,
        
$aMenuClose     = &#39;&#39;,
        
$aTopItemOpen   = &#39;&#39;,
        
$aTopMenuOpen   = &#39;<option value="1">please choose</option>&#39;
        
);
?>

</select>
</form>

That´s it - enjoy!
« Last Edit: November 05, 2008, 03:11:53 AM by vyni »
Logged

Offline BerndJM

  • Posts: 1764
  • Gender: Male
Re: menu in dropdown-list
« Reply #2 on: November 05, 2008, 02:53:52 AM »
Hi viny,

just a little correction:
Code: [Select]
<select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">
:wink:

Regards Bernd
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.

vyni

  • Guest
Re: menu in dropdown-list
« Reply #3 on: November 05, 2008, 03:11:41 AM »
Klar, hast recht.

beim ausprobieren hab´ ich´s doppelt eingesetzt dann aber irgendwas nicht zurückbenamst. korrigiert.
Logged

peturkirke

  • Guest
Re: menu in dropdown-list
« Reply #4 on: November 05, 2008, 11:42:03 PM »
thank you very much

is it also possible to have some of the menu-items in one drop-down list, and the rest of them in another drop-down list ?
Logged

Offline BerndJM

  • Posts: 1764
  • Gender: Male
Re: menu in dropdown-list
« Reply #5 on: November 06, 2008, 12:18:31 AM »
Yes of course.
It's in principle the same as descibed here -> http://help.WebsiteBaker.org/pages/en/advanced-docu/designer-guide/multiple-menus.php

The difference:
you use show_menu2 and you have to handle two forms eg. jump1 and jump2

Regards Bernd
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • menu in dropdown-list
 

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