(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:
Offline Mobile Website Builder Software Free and Easy Website Builder  |  Best 18 Landing Page Bootstrap Theme Roundup  |  Bootstrap Table Template  |  Top Mindblowing HTML Image Slideshow Ideas  |  40+ Free Bootstrap Templates 2018  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. it | website design software | Bootstrap Templates | top website builder | bootstrap navbar examples