(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:
Mobile Page Layouts Overview Mobile-friendly Web Page Themes Review  |  Responsive Website Maker  |  Responsive Site Theme  |  Bootstrap Site Themes Review  |  Mobile-friendly Page Maker  | 
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 | Free AI Website Builder | AI Website Builder | Free AI Website Generator | AI website design generator