This sample page was created in reference to this thread in the "Help and Support for Version 5".
To use the mm_breadCrumbAnchor() function:
- Place the following code at the top of your menu_data.js file
// EDIT THESE TWO VARIABLES AS PREFERRED // // var mm_closeBcMenus = true; // var mm_highlightParentItems = true; // // /////////////////////////////////////////// var mm_breadCrumbAnchor = -1; function mm_breadCrumbs() { var selectedItem = _itemRef; var i = mm_breadCrumbAnchor; if (mm_closeBcMenus) $Z(); if (i > -1) { do { _mi[i][7] = _m[_mi[i][0]][6].offbgcolor; _mi[i][8] = _m[_mi[i][0]][6].offcolor; BDMenu(_mi[i][0]); i = getParentItemByItem(i); } while (!isNaN(i) && mm_highlightParentItems); } i = mm_breadCrumbAnchor = selectedItem; do { _mi[i][7] = _mi[i][19]; _mi[i][8] = _mi[i][18]; BDMenu(_mi[i][0]); i = getParentItemByItem(i); } while (!isNaN(i) && mm_highlightParentItems); }
- Define the two user variables - mm_closeBcMenus, and
mm_highlightParentItems - at the top of the menu_data.js file according
to the following descriptions:
- mm_CloseBcMenus - Set to true if you want your submenus to
close after a menu selection is made. Set to false to leave submenus
open after a menu selection is made.
- mm_highlightParentItems - Set to true if you want the selected item and all of its parent items (back to the main menu) to be highlighted. Set to false if only want the selected item to be highlighted.
- mm_CloseBcMenus - Set to true if you want your submenus to
close after a menu selection is made. Set to false to leave submenus
open after a menu selection is made.
- Call the mm_breadCrumbs() function from a menu item, using the menu
item's clickfunction property, as shown in the following examples:
aI("text=Item Text;showmenu=subMenuName;clickfunction=mm_breadCrumbs();"); aI("text=Link to IFRAME;url=javascript:openIFrame('tempiframe','page1.htm')`;clickfunction=mm_breadCrumbs();");