开发者

Adding Quick Launch links in Sharepoint 2007 for new dashboards added via a wsp

I have a Sharepoint wsp file in which I create two new dashboards (both the aspx f开发者_开发技巧iles and their metadata setup are included in my elements.xml file).

The wsp deploys fine, and I can see my two new dashboards if I click on 'Dashboards' on the quick launch bar. However, I would like to include links to these two new dashboards in the quick launch bar.

How is this done? Any suggestions/links would be greatly appreciated!


SPNavigationNodeCollection ql = yourSpWeb.Current.Navigation.QuickLaunch;
SPNavigationNode navNode = new SPNavigationNode("New Link", 
                                 "relative/path/to/yourpage.aspx", true);
ql.AddAsFirst(navNode);

(If you want to add child nodes then use navNode.Children.AddAsFirst)


You could use a Feature Activation handler to programmatically add the links that you want to the Quick Launch Bar.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜