What's new on site Web Part for SPS [Free]

What's new on site Web Part for SPS [Free]

 

 

Translated by: Rickie Lee (rickieleemail # yahoo.com)

Jan. 2005

Jan Tielens' Bloggings 提供了What's new on site Web Part for SPS,该Web Part用来显示SharePoint站点上最新或更新的项目(item)。他提供了Leadit.SharePoint.Essentials VS.NET项目下载(Source code in C#),该项目包括:WhatsNew, Navigation, MyAlerts and BreadcrumbsWeb Parts

 

What's New Web Part Demo界面如下:

 

缺省情况下将检测SharePoint站点中所有列表(list),但是你可以通过Exclude Lists属性来排除某些列表(使用;字符来分开列表)。SharePoint中大部分列表都有Title字段,但是也有一些异常,如ContactsLinks。因此缺省情况下,What's new Web Part将显示每一个项目(item)的Title字段值,但是你可以通过List fields属性来指定每一个列表list所要显示的字段,该属性的缺省值为Contacts=Last Name;Links=URL;,表示Contacts列表将显示Last Name属性,而Links列表将显示URL属性。

 

另外,Items to display属性用来指定显示的项目数,Show data表示是否显示日期字段,Item icon URL属性指定需要显示的图标。

 

What's new Web Part通过使用SharePoint Object model提供的SPQuery对象,并定义该对象的Query属性来检索需要的项目,示例代码如下:

SPQuery query = new SPQuery();

query.Query = "<Query><OrderBy><FieldRef Name ='Modified' Ascending='FALSE'/></OrderBy></Query>";

query.RowLimit = (uint)this.ItemsToDisplay;

 

***

不过,该Web Part不能够检索Document Library下一级子目录subfolder中的内容,有兴趣的朋友可以尝试一下。

 

Jan Tielens' Bloggings提供的相关POST如下:

1New SharePoint Web Part: What's New, http://weblogs.asp.net/jan/archive/2004/03/04/84011.aspx

2Bugfix for What's New Web Part & RSS Feed for SharePoint, http://weblogs.asp.net/jan/archive/2004/04/26/120508.aspx

 

 

posted @ 2005-01-07 01:18  Rickie  阅读(1360)  评论(1编辑  收藏  举报