WebsiteBaker Support (2.8.x) > Templates, Menus & Design

menu in dropdown-list

(1/2) > >>

peturkirke:
Is it possible to show the menu-items in a dropdown list (<select> <option value...) ?

and how do i do it ?

vyni:
Hi,
jo it is possible - just add it to the template where it should appear.

this is the code


--- Code: ---<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>
--- End code ---

That´s it - enjoy!

BerndJM:
Hi viny,

just a little correction:

--- Code: ---<select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">

--- End code ---
:wink:

Regards Bernd

vyni:
Klar, hast recht.

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

peturkirke:
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 ?

Navigation

[0] Message Index

[#] Next page

Go to full version