August 3, 2012 1 Comment
The built in navigation for SharePoint in general can take some getting used to. In 2010 it is much better, but there are some occasions where a client may want something that is different than the way that SharePoint wants to do it. In this case the client was asking for a drop down menu where a user could pick from “any of the team team sites” and “just go there”.
And if you were in a team site, then list the other ones.
There are a few main parts of the JS that needed to be ironed out.
- First, communicating with SharePoint to get a list of all the webs that were under this site.
- Second, iterating over the results and appending them to a select drop down box with the needed data and labels.
- Third, recognizing the dropdown changes and routing the user appropriately. Read more of this post