
MenuMachine 1 only
GoLive 6, CS, CS2
Mac, Windows
Article ID: 000062
Category: Menu Editing Issues
Changing a menu item to a new level within the menu structure.
Changing a parent item to a submenu item.
Changing a submenu item to be a parent item.
This can't be done using the MenuMachine interface, but you can do some hand-coding if you are confident with editing source code.
IMPORTANT: We advise you work on a COPY of your page as editing menu code can cause errors if the syntax is not perfect.
Here is a simple example with this menu structure:
Menu 1
> Sub Menu 1
> Sub Menu 2
>> Sub Sub Menu A
>> Sub Sub Menu B
Let's bring Sub Menu 2 and its 2 Submenus back to the same level as Menu 1:
Menu 1
> Sub Menu 1
Sub Menu 2
> Sub Sub Menu A
> Sub Sub Menu B
Go to source mode and locate the start of the menu's code. Your code will be slightly different and here are shortened lines to simplify what to change.
/*begin_bbMenuDefs*/
bbMenu[bbL].bM("bbMenu1","","Menu 1",<code removed>;
bbMenu[bbL].bM("m2b39ych","bbMenu1","Sub Menu 1",<code removed>;
bbMenu[bbL].bM("m2b4ykph","bbMenu1","Sub Menu 2",<code removed>;
bbMenu[bbL].bM("m2b4ykpi","m2b4ykph","Sub Sub Menu A",<code removed>;
bbMenu[bbL].bM("m2b4ykpj","m2b4ykph","Sub Sub Menu B",<code removed>;
/*end_bbMenuDefs*/
bbMenu[bbL].buildLayers();
//-->
The first three items on each row between the " " are:
bbMenu[bbL].bM("This item's unique number","This item's Parent's unique number","This item's text",
So to change the hierarchy, you need to change the menu item's parent, or if it has no parent (is a top-level item) remove the name between the " ". So to move Sub Menu 2 up to the top level, simply remove its parent item from the second set of quotes. (Leave the empty quotes in place.)
/*begin_bbMenuDefs*/
bbMenu[bbL].bM("bbMenu1","","Menu 1",<code removed>;
bbMenu[bbL].bM("m2b39ych","bbMenu1","Sub Menu 1",<code removed>;
bbMenu[bbL].bM("m2b4ykph","","Sub Menu 2",<code removed>; <- deleted bbMenu1 from second ""
bbMenu[bbL].bM("m2b4ykpi","m2b4ykph","Sub Sub Menu A",<code removed>;
bbMenu[bbL].bM("m2b4ykpj","m2b4ykph","Sub Sub Menu B",<code removed>;
/*end_bbMenuDefs*/
bbMenu[bbL].buildLayers();
//-->
After you have done this, go back to Layout mode and invoke the MenuMachine 1 inspector by clicking on the menu.
You need to adjust the size of the menu to accommodate the new item on the top row.
Click on the Base Menu Resize button in the edit tab and check the new Total Width.
Once you know how to read the code as above, you can move a menu item to a new location in the menu structure.
Last updated: July 29, 2006
This article has been viewed 4699 times.