cleo-凡事从积极的态度做起

学习,学习,学习 BI/biztalk/infopath/sharepoint,呵呵。 学习没有止境。。。

导航

Adding "OpenInNewWindow" option to SharePoint Links lists ,在链接列表中添加“在新窗口打开”的链接

 

Forward

A very common question that pops up in the SharePoint newsgroups, list servers, and blogs surrounds the issue that the SharePoint Links Web Part doesn’t provide the option to open new links in new widnows. 

Many people have come up with their own work-around solutions.  Todd Bleeker has a good solution that involves using the Content Editor Web Part (CEWP) in his Dashboard Web Part series, but you have to add the CEWP to every single page.[2]

Wouldn’t it be nice if it was part of the solution OOTB on every new site you created?  Of course!  How would you do this?  One way is to modify the Links list template in the site definitions.[1]

In this article, I’ll show you how you can make a few modifications to add a new field to each link that allows contributors to specify if links should open in a new window or not.

All files created/modified of any importance are available for download at the end of this article.

Tangent: List Templates and Site Definitions

For a super fast overview, when a new SharePoint site is created, one of the first steps you take is to select a template to build out the site.  These templates are defined in the file system: C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033.  After selecting a template, SharePoint uses the ONET.XML & SCHEMA.XML file to build out the default lists and adds the default Web Parts to the homepage.  The ONET.XML file also contains information about what types of lists can be created once the site has been created.  It is within these site definitions and templates where you can create your own OOTB lists for sites and really make some powerful solutions. 

For more information on creating your own site defintions, refer to the footnotes.[2]

Overview

So how are we going to implement this “OpenInNewWindow” feature?  We’re going to do it the Microsoft recommended way:

  • Part 1: Copy an existing site defintion
  • Part 2: Modify the SCHEMA.XML file in our new site definition using CAML

参考:

http://andrewconnell.com/blog/articles/SharepointLinksListOpenInNewWindow.aspx

 

posted on 2005-12-01 19:09  无为而为-凡事从积极的态度做起  阅读(381)  评论(0编辑  收藏  举报