(c) 2016, Deluxe-Menu.com
Search  
Ctrl+F2 - enter/switch menu | Arrow keys - navigate | Esc - exit menu  
  Support
  FAQ
  Contacts
  About Us
  Recent Questions


 

    Can you please give me an example of how I would return the full path to the selected item of the web site menu?

Return to Recent Questions


Q: Can you please give me an example of how I would return the full path to the selected item of the web site menu?

A: See the following example:

function getFullPath(mInd){
var result='';

// get pressed item
var params = dm_ext_getMenuParams(mInd);
if (!(params[2]>=0)) return '';

function getPathForItem(mInd,smInd,itInd){
// get for this item
var params = dm_ext_getItemParams(mInd,smInd,itInd);
var result = params[2]+ '('+ params[3]+')';

// find root item id
if (smInd <= 0) return result;
params = dm_ext_getSubmenuParams(mInd,smInd);

for (var smInd_=0;smInd_ for (var itInd_=0;itInd_ itParam = dm_ext_getItemParams(mInd,smInd_,itInd_);
if (itParam[0]=arams[2])// id
return result + '->' + getPathForItem(mInd,smInd_,itInd_);
}
}
return result;
};

return getPathForItem(mInd,params[1],params[2]);
}





Return to Recent Questions

Related:
Free and Easy Website Builder Top Mindblowing HTML Image Slideshow Ideas  |  Bootstrap Table Template  |  Bootstrap Alert Colors  |  Best 18 Landing Page Bootstrap Theme Roundup  |  Offline Mobile Website Builder Software  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. Free AI Website Builder | AI Website Builder | Best AI Website Builder | Website Generator AI | AI web page design generator