Recent Questions Dhtml Tree Without The Plus SignQ: Is it possible set a menu item to pressed when a page is loaded when you have multiple drop down menus on the page?
A: See the first parameter in
dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion)
function is index of the menu.
So, if you use several menus on the one page you should use differentmenuInd parameter.
For example you have:
So, for the second menu you should write:
dm_ext_setPressedItem (1, 2, 5)
Q: How would I use the submenu feature to display itself only if a person is logged in. such as if a person logged in then the member area would expand, else it would always stay closed with only the login username section showing?
A: Unfortunately it is not possible. You can only add items depending onthe logged user.
You should use API functions:
see more info:
For example, you can use:
function dtreet_ext_insertItem (menuInd, parentItemID, itemInd, itemParams)
function dtreet_ext_deleteItem (menuInd, itemID)
function dtreet_ext_showItem (itemID, visibility)
function dtreet_ext_expandItem (itemID, expand)
I have id of the submenu.
How can retrieve id of the parent menu?
A: You can try to use the following function
function dm_ext_getSubmenuParams (menuInd, submenuInd)
Returns submenu parameters in the array:
[submenu_id, items_count, parent_item_id, submenu_level, is_horizontal]
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
Using this function you can retrieve the parent_item_id.
More info see:
Q: Is it possible to centere mouse over drop down menu?
A: Check that you set relative position for the menu:
Place your menu in DIV or TABLE with center alignment.