I'm creating a custom "mega menu" web part to replace the default SharePoint global navigation menu. This web part will be deployed to SharePoint Online (i.e. Office 365) so has to be a sandbox solution.
Since the menu itself will display more than just links (it will also display images for each site, a short block of intro text etc.. ), I need to bind it to a custom datasource which can serve up all this extra info. I've opted to use a .sitemap file for the menu's datasource.
I'd obviously like to leverage the caching and security trimming that comes with the OOTB sitemap providers, but none of these seem to be available in the sandbox, e.g. http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.navigation.spsitemapprovider.aspx
- Is there any way to programmatically point one of the existing OOTB sitemap providers to my custom .sitemap file?
- If not, am I able to create a custom sitemap provider class within my sandbox solution which can load the contents of my .sitemap file (which is stored in a document library)?
- If sitemap providers are simply not an option, does anyone have any useful references which demonstrate how to parse a .sitemap efficiently (perhaps using LINQ)? And ideally, which also deomstrates how to cache and security trim the data too.