I saw a Demo in CodePlex at : http://spquerydemo.codeplex.com . It presents an extensive sample code for many ways of querying SharePoint.
I've found the solution.
This Code Works like a BOOM. Instead of "SiteMapNode" object you need "PortalListItemSiteMapNode" for indexer to work.
public List<string> GetChachedItems(string webUrl, SPQuery query)
This lists all the namespaces and classes that Sandbox supports --
http://msdn.microsoft.com/en-us/library/ee537860.aspx .. Microsoft.SharePoint.Navigation is supported, but not Microsoft.SharePoint.Publishing.Navigation
What i read from your question, correct me if im wrong, is you want the navigation to span across site collections.
The OOB hierarcical navigarion providers cannot so this.
There is an MSDN article that can work as a primer to get started here. You can also find several examples on codeplex and by googling Cross Site Collection Navigation.
The way i solve ...
he sitemap is located at the root level site collection. The url to access the sitemap is http://<WebApp>/sites/<SiteColl>/sitemap.xml. This file contains the location of actual sitemap and that is http://<WebApp>/sites/<SiteColl>/sitemap0.xml. The content of the sitemap file is like:
read complete: https://mysharepointlearnings....
I think this works for you:
<SharePoint:SPTitleBreadcrumb runat="server" RenderCurrentNodeAsLink="true" SiteMapProvider="SPContentMapProvider" CentralAdminSiteMapProvider="SPXmlAdminContentMapProvider">
<SharePoint:ClusteredDirectionalSeparatorArrow runat="server" />
There is one built in: SharePoint 2010 > Edit > Insert > Web Part > Content Rollup > Table of Contents.
Table of Contents webpart is used to show Sub Sites, Library, Lists, Discussions, etc...
May be it can solve your problem.
If you want to use webparts than below are the best solutions available.
How to create a SharePoint visual site map ...
You can check the web configuration file and see the navigation provider class name.
It should be C# code which basically creates those menu items, you can check user permission and then choose to show or hide.
Since it's sealed I have another idea.
What I've done before is actually just query another SMP in my custom SMP. This strategy might work for you. You basically just create a wrapper SMP that queries the taxonomy one and modifies the nodes it returns before you return them in your SMP. Below is some sample code.
public class CustomNavProvider : ...
Cache misses are mostly likely to happen because of insufficient memory as they all are stored in Ram. If not then mostly cause must do with the Cache configuration. I would suggest to try the different settings specified for the object cache like changing the maxSize directly in the web.config etc. in the article below,
"Cache miss for query Web" may be the answer. You may be looking at the ULS log for the wrong portion. I would look at the ULS log for the first successful run and see if there is not a cache miss for the list that results in a cache dump for the list you are querying.
You may be able to remedy by changing the query from server side to client side. If I ...
As you might know already the Top-Navigation bar is not cross site collections (Collaborative or Publishing). One alternative is to make your own Portal site map provider and use it in a custom master page or by using the Delegate control with your own (e.g. deploy a SiteMap physically, or a any other more dynamic variant). Many variations are available, ...