XML Menu - URL links broken

I’ve been working on an imitation of the SamataMason website sub navigation. Right now I have a top level menu that is created from an array, and a sub menu display that is created from XML. If you click on any of the top 4 or so items in the menu you’ll see a list of links displayed below. The problem at this point is that the line of code that controls which XML nodes get displayed causes the URL links to break.

Line 37 of the “XML functions” layer contains the code that breaks the URL links:

if (item.attributes.industry == industry) {

If you comment out the line (and it’s closing brace on Line 54) you can click on any of the top 4 menu items and it will display a list in which the URL links work. But you’re not seeing the appropriate list for each menu item.

Anyone know how to rewrite this line so that it doesn’t interfere with the other code? I’m baffled as to why “URL” breaks but the “client” nodes still work.

My apologies to SamataMason for borrowing their content. :slight_smile: It’s just for learning purposes.