1

We have a custom Master Page with a drop down navigation menu replacing the global navigation.

I have recently added a new subsite and need this to show on the navigation menu.

I have managed to find that this is under a div called

<div class="nav-container">

Which is present in our Master Page. However this is all that is on the Master Page for this DIV.

Opening the DOM explorer (F12) on the page shows that there is HTML somewhere giving the links and the displayed names within this nav somewhere, however it is not on the Master Page.

It is also not within the CSS that feeds this page.

Any ideas where I can find this so I can add the new subsite?

  • 5
    Then that leads me to believe the navigation is dynamically built and loaded via JavaScript. You'll have to start debugging any custom scripts on your master page to see how the navigation is built and appended to the nav-container and assess what you need to do to get your new subsite added. – Eric Alexander Feb 22 '17 at 17:52
  • 2
    Open the site, open F12 Console, press CTRL+SHFT+F to search nav-container in everything.. – Danny '365CSI' Engelman Feb 22 '17 at 18:49
  • @EricAlexander thanks, I think I have found it. Now to work out what the hell the JS is doing – Cearon O'Flynn Feb 23 '17 at 9:05
1

The DIV was using JavaScript to reference a SharePoint List

The Nav-container DIV contained another DIV and within this there was a list called Megamenu.

This was being built dynamically to populate the navigation.

The JavaScript was looking to the Mega Menu list which had a sharepoint address, I knew then to look for a list Mega Menu under the site collection site contents.

Once I found it I added my new subsite into this list, with the title I wanted to display and the URL to the new subsite.

The Master Page didn't need to be changed.

  • 1
    Good investigative work! – Eric Alexander Feb 23 '17 at 12:29
  • thanks @EricAlexander, your comment to keep looking at the JS helped though, i was looking at them but didn't really see it till I came and saw it with fresh eyes and it all made sense. – Cearon O'Flynn Feb 23 '17 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.