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 @   Rickie  阅读(1360)  评论(1编辑  收藏  举报
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示