I am trying to Create Custom Navigation control which read Nodes from given PortalSiteMapDataSourceID and generate XML and then use XSLT to generate HTML out of it.How can i find selected node from DataSourceID so i can add one more XML selected = true ? Please advise

Thanks Ronak

1 Answer 1


This example is complicated, so I'm not sure that it is the best way in you case )

ProviderSettings settings = new ProviderSettings("GlobalNavSiteMapProvider", "Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c");
settings.Parameters["NavigationType"] = PortalNavigationType.Current.ToString();
settings.Parameters["EncodeOutput"] = "true";

PortalSiteMapProvider provider = (PortalSiteMapProvider)ProvidersHelper.InstantiateProvider(settings, typeof(PortalSiteMapProvider));
PortalSiteMapNode currentNode = (PortalSiteMapNode)provider.CurrentNode;
  • Thanks Alexander it helps to give me direction and achieve what i want.
    – Ronak
    Commented Mar 1, 2012 at 14:26
  • I have a post that describes how to implement cross site collection navigation control. There are a litle explanation how to Portal site map provider works. I hope it will be helpful to undrestand what you wants to implement.
    – Alexander
    Commented Mar 1, 2012 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.