Hi Guys,
I was wondering if anyone has any experience adding sub headings to the top navigation bar in Sharepoint 2010. This is what I want to acheive but have very little experience with SP 2010 and next to zero coding experience.
I have a number of meeting rooms setup as calendars that are accessed from the top navigation bar (see attachments for details)
I now have to add meeting rooms for a new office so want to have a subheading for each site, then the meeting rooms below those sub headings. So far I have been unable to add the sub headings and don't want all of the meeting rooms at the same level because it looks untidy and may cause issues for people with low res monitors.
I have stumbled across a website that features the code to do what I want, but have no idea where to put it!
Here is the code:-
SharePoint doesn't allow to add Sub Heading under Heading. Here is the code to achieve it.
SPNavigationNode oNewNode = new SPNavigationNode("Heading", "");
oWeb.Navigation.TopNavigationBar.AddAsLast(oNewNode);
oNewNode.Properties.Add("NodeType", "Heading");
oNewNode.Update();
SPNavigationNode oChild1 = new SPNavigationNode("SubHead1", "");
oNewNode.Children.AddAsFirst(oChild1);
oChild1.Properties.Add("NodeType", "Heading");
oChild1.Update();
SPNavigationNode oChild2 = new SPNavigationNode("SubHead2", "");
oNewNode.Children.Add(oChild2, oChild1);
oChild2.Properties.Add("NodeType", "Heading");
oChild2.Update();
SPNavigationNode oChild3 = new SPNavigationNode("SubHead3", "");
oNewNode.Children.Add(oChild3, oChild2);
oChild3.Properties.Add("NodeType", "Heading");
oChild3.Update();
Any thoughts guys? Im shocked that Sharepoint is not capable of this basic feature!
Many thanks
John