Recent Questions Tree Menu Css
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:
http://deluxe-menu.com/functions-info.html
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)
Q: I already found out the use of the pressedItem setting. However Iwas looking to be able to have a submenu in the html dropdown menu already expanded on pageload. Can you tell me if this is possible yet in any way ?
A: You can find the example here
http://deluxe-menu.com/highlighted-items-sample.html
Click on the following link:
Highlight "Product Info/Installation/Description of Files" item.
Use the following function to highlight items
function dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion, parentOpen)
where parentOpen = true/false - open all submenus to show the selected item
http://deluxe-menu.com/functions-info.html
Q: I am having some difficulty dynamically adding items to a tree javascript and menu.
I have a menu with one "root" item. I see the use of the "+" symbol within the item name. I do not see any documentation regarding this symbol, only "|". Can you explain?
If I have one menu with this one "root" node, how would I add an subitem to this root node?
Here is my code so far, but the inserted items appear to be at the same level as the root node.
var rootItem = dtreet_ext_getItemIDByIndex ( 0,0 );
var menuItem = new Array(10);
for ( var i = 0; i < producers.length; i++ )
{
var producer = producers[ i ];
menuItem[0] = producer.name;
dtreet_ext_insertItem ( 0, 0, i + 1, menuItem );
A: See dtreet_ext_insertItem () function has the following parameters:
function dtreet_ext_insertItem (menuInd, parentItemID, itemInd, itemParams)
Creates a new item and inserts it into a specified position.
menuInd - index of a javascript and menu on a page, >= 0.
parentItemID - ID property of an item.<, >= 0.
itemInd - index of a new item within the javascript and menu, >= 0.
itemParams - item parameters.
Notice that parentItemID is the Id property of the parent item (notindex). If you want to add top items you should set parentItemID=0.
itemInd - you should use this parameter if you want to add item in thespecific place, for example set itemInd=5 if you want to add itembefore the existing item with itemInd=5.
If you set itemInd=null the new item will be added at the end of this submenu and its index will be added automatically.
Q: No matter where I place the code, the html free menu always appears in the top left of the page,
I need it elsewhere obviously but it simply won't move.
A: You're using absolute position for the menu now.
You should use relative position in that case.
Change the following parameters:
var absolutePos=0;
var posX="0px";
var posY="0px";