3

I am trying to display top navigation as drop down menu just like you see in theme "seattle".

I created my own theme, then I went to "Design Manager" and then I went to "Snippets". I copied the top navigation snippet in my master page but it is showing all links as it is i.e. it is not showing in drop down format.

I thought may be because I didn't use snippet from "seattle" so I copied seattle's snippet in my master page but same problem :(

How do I show drop down like seattle so that I can modify it according to my needs? I will modify it using Firebug but first I need to display it which I am unable to to for the past many days now.

EDIT1

  1. I have opened preview and snippet of seattle theme
  2. I am just playing with values of StaticDisplayLevels and I notice that when I press "Update" button, it does change preview in "snippet"
  3. But when I go back to preview page (the left side tab in screenshot) and refresh page then I don't see any change. So it looks like besides pressing "Update" button I also need to do something else?

Screenshots given below.

  • Screenshot1 enter image description here

  • Screenshot2 enter image description here

6 Answers 6

2

Did you change any attributes inside SharePoint:AspMenu ?

Try setting StaticDisplayLevels="3" and MaximumDynamicDisplayLevels="1" inside your generated HTML for the master.

Or, in the Design manager, in snippet's settings, you could set the same settings according to the sceenshot:

enter image description here

4
  • I did like you said but still no drop down menu. But I noticed one thing. I made the changes, Clicked on "Update" button, then copied that code again and pasted it in my master page. Then after that when I went to snippet again, I saw that the changes I made have been reverted. So basically StaticDisplayLevels changes back to "2" from "3" and MaximumDynamicDisplayLevels changes back to "0" from "1" Aug 15, 2013 at 13:19
  • That's weird. So, I think the problem is somewhere there. What if you try to temporary remove the association between .master and .html by deselecting the check box in .html's file properties?(ge.tt/1PyFAyo/v/0). Then inside .master try chaning the same attributes that are not saved. Aug 15, 2013 at 13:30
  • Ok I did a complete reinstall of Windows Server, SQL Server and SharePoint. Now when I change values then I can see changes but still something is missing. Please check my EDIT1 above in which I have explained in detail. Looks like my understanding is incorrect. Aug 16, 2013 at 7:22
  • I am able to display drop down menu. This is how I did, make changes in snippet, press Update button, copy new code, check out your master page and open it in SD, paste new code, save page or publish it, refresh page in browser and now you will see changes. Plus I also found out that there is a known bug in SharePoint 2013 which won't allow you to display more than 2 levels using MaximumDynamicDisplayLevels unless you use managed navigation. Aug 16, 2013 at 9:58
0

I think you need to change it within sharepoint to make it into a drop down:

http://www.helpmeonsharepoint.com/2012/08/sharepoint-2013-easier-custom.html

You need to set the global navigation to

"Managed Navigation"

managed nav

this will change your menu to a drop down for the siblings ;)

happy coding :)

2
  • I am already using Managed Navigation and all my links are being shown in drop down in seattle. But when I apply my own theme and then copy/paste snippet where I want navigation to appear, it doesn't show in drop down format but just plain links. Aug 15, 2013 at 12:44
  • are you trying to move the menu from one location to another? eg from left to far right or bottom of page?
    – Ali Jafer
    Aug 15, 2013 at 13:15
0

If your menu is still not displaying in a drop-down, make sure the AdjustForShowStartingNode = true.

enter image description here

0

If you are using managed navigation, then you will need to create items for navigation using Site Settings -> Term Store Management Tool. This would create the items in the menu. Also grab the navigation code from default master page files (solo.html) and put in your template. That should fix drop downs for global navigation.

0

Under Customizations - Top Navigation (AspMenu)

Under Important - Set StaticDisplayLevels = 2

Under Behavior - Set MaximumDynamicDisplayLevels = 3

0

Please refer to this MSDN article: https://msdn.microsoft.com/en-us/library/ecs0x9w5.aspx

The static view (StaticDisplayLevels) allows you to set the static (always appearing items).

The Dynamic view (MaximumDynamicDisplayLevels) allows the items to be visible once you hover into it.

My settings for it would be to set static to 2 and dynamic to 3.

But everything has to depend on your navigation settings and your subsites and pages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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