问题描述
我在sharepoint中有一个要求,我想在该位置基于Excel文件创建顶部链接导航.表示excel文件中提到了站点导航结构(以及父站点下的父站点子站点).我需要阅读该结构,并基于修改共享点中的导航.
I have a requirement in sharepoint where I want to Create the top link navigation based on excel file. Means The site navigation structure (along with parent site subsite under parent site) is mention in excel file. I need to read that structure and based on modify the navigation in sharepoint.
请任何人告诉我是否可以通过这种方式配置导航.如果是,那么请告诉我如何实现.
Please can any one tell me is it possible to configure navigation in such a way. If yes then please tell me how to achive it.
仅供参考:我正在使用MOSS 2007.
FYI: I am using MOSS 2007.
预先感谢
sachin katkar
sachin katkar
推荐答案
如果这是一个发布站点,则可以使用类似于以下内容的代码:
If this is a Publishing site, you can use code similar to the following:
PublishingWeb publishingWeb = PublishingWeb.GetPublishingWeb(SPContext.Current.Web);
SPNavigationSiteMapNode.CreateSPNavigationNode(title, url, NodeTypes.AuthoredLinkToPage, publishingWeb.GlobalNavigationNodes);
publishingWeb.Update();
这篇关于Sharepoint通过编程创建网站导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!