Forums Archive Index > SmartMenus 5 > Can't make a submenu
Date: 25 Jan 2006 11:32 am
Maybe i'm stupid but i really can't figure how to make a submenu. I have read the manual but i'm still confused. This is my menu - so far... :?
s_add(
{N:'test_menu',LV:1,W:130,T:11,L:1,P:true,S:s_CSSTop,
FTY:true,FTX:true,FTT:1,FTL:1 // the properties used to make the menu floating
},
[
{U:'index.php',T:'Forside 1',TextAlign:'center',SELECTED:true,SeparatorSize:2},
{U:'http://www.mysite.com/test/bm1.php',T:'BMI'},
{U:'http://www.smartmenus.org/',T:'Test2'},
{U:'http://www.smartmenus.org/',T:'Test3'},
{U:'http://www.smartmenus.org/',T:'Test4'},
{U:'http://www.smartmenus.org/',T:'test5'},
{U:'http://www.smartmenus.org/',T:'test5_sub'},
{U:'http://www.smartmenus.org/',T:'Test7'}
]
);
I would f.x. have the "test5_sub" to be a sub under "test5". Can anyone tell me how to to it ?
Date: 25 Jan 2006 4:24 pm
Here's how to do it:
---------------------------------
s_add(
{N:'test_menu',LV:1,W:130,T:11,L:1,P:true,S:s_CSSTop,
FTY:true,FTX:true,FTT:1,FTL:1 // the properties used to make the menu floating
},
[
{U:'index.php',T:'Forside 1',TextAlign:'center',SELECTED:true,SeparatorSize:2},
{U:'http://www.mysite.com/test/bm1.php',T:'BMI'},
{U:'http://www.smartmenus.org/',T:'Test2'},
{U:'http://www.smartmenus.org/',T:'Test3'},
{U:'http://www.smartmenus.org/',T:'Test4'},
{Show:'test5_sub',U:'http://www.smartmenus.org/',T:'Test5'},
{U:'http://www.smartmenus.org/',T:'Test7'}
]
);
// below is the sub menu for the "Test5" menu item
s_add(
{N:'test5_sub',LV:2,W:130,T:'',L:'',P:false,S:s_CSSTop},
[
{U:'http://www.smartmenus.org/',T:'item 1'},
{U:'http://www.smartmenus.org/',T:'item 2'},
{U:'http://www.smartmenus.org/',T:'item 3'},
]
);
---------------------------------
Also please take a look at the s_arrays.js file in the Basic Example folder- it contains many sub menus. And it will be easier for you to understand how sub menus can be configured. :)