1

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

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=14.0.0.0, 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;
| improve this answer | |
  • Thanks Alexander it helps to give me direction and achieve what i want. – Ronak Mar 1 '12 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 Mar 1 '12 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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