We're in the process of migrating to SharePoint Online from SharePoint 2007. It's become painfully clear that the way we architected our environment is not really jibing with SharePoint Online. We have a site collection that has almost 2000 subsites and it's uncovered some serious performance issues. As I understand it, my options for navigation are as follows (preference is bolded)--
- Structured Navigation -- painfully slow, not really an option. 57 second load time!
- Manually updated list of sites on the parent page -- please don't make me do this. It's bound to get out of sync and users will not be able to find the sites.
- Search-based web part -- this seems like an option, but I can't come up with anything that looks nice and it seems to have some irritating limitations like no more than 50 results per page.
- Somehow recreate the list that exists on the Site Contents (viewlists.aspx) page on my parent landing page. This list looks perfect and I'd love it if I could recreate it as is, but the problem is I have no idea how to do that. I'm also failing to understand why this would load so snappy but Structured Navigation would load so slowly -- seems like they're doing the same thing.
Can anyone help me out with this?
Update: So I've decided to create an "app part" using the Javascript object model and I'm actually making some pretty good headway. At the moment I've got the collection of subwebs loaded into a var
called webCollection
and I've got them displaying as options in a box. The only reason they ended up there is because that was the sample code that I had to work with :) I'd ideally like them in a nicer looking list, similar to the viewlists.aspx
page with clickable links. Can someone help me figure out modify my existing code? Here are the relevant bits --
SubsiteListAppPart.js
function GetSubwebsToDisplaySuccess(sender, args) {
// Success getting the subwebs. Set references to the subweb
// elements and the list of available subwebs.
var subwebEnumerator = webCollection.getEnumerator();
var selectSubwebBox = document.getElementById("listItemSubwebBox");
if (selectSubwebBox.hasChildNodes()) {
while (selectSubwebBox.childNodes.length >= 1) {
selectSubwebBox.removeChild(selectSubwebBox.firstChild);
}
}
// Traverse the elements of the collection, and load the name of
// each list into the dropdown list box.
while (subwebEnumerator.moveNext()) {
var selectOption = document.createElement("option");
selectOption.value = subwebEnumerator.get_current().get_title();
selectOption.innerText = subwebEnumerator.get_current().get_title();
selectSubwebBox.appendChild(selectOption);
}
}
SubsiteListAppPart.aspx
<body>
<select id="listItemSubwebBox"></select>
</body>
LATEST UPDATE:
I'm now at the point where I have a <table>
of <a>
elements of all my subsites! The last piece I'm struggling with is the default sizing of the app part iFrame. I need to autosize to the height/width of the table, but can't figure out how to do so. I may start a new question for this.