When the SmartTools What's New web part is placed on a web part page in a SharePoint site, the web part can be configured by clicked the Modified Shared Web Part menu item from the web part's dropdown menu. In the properties of the What's New web part you can configure following settings:
  • Settings group
    • Number of items to show: determines the maximum number of items to show in the What's New web part.
    • Maximum age of items (in days): determines how long the items will be displayed in the web part. E.g. if you specify 5 as the value, only items that have been created and/or changed in the last 5 days will be displayed.
    • Scope of the Query: determines where the What's New web part will check for new or changed items, possible values:
      • Site: the current site only
      • Recursive: the current site plus all the sub sites of the current site
      • Site Collection: the entire site collection of which the current site is a member
    • Cache interval: the number of seconds the results shown in the What's New web part will be cached. This cache is per user. After a change to the properties of the What's New web part, the cache is cleared automatically to reflect the changes.
    • List of content types: a list of content types which will be excluded or included from the results shown in the What's New web part. The list is separated with the ; character. For example: "Folder;Task". The maximum number of content types in the list is 8.
    • Content types are: Possible values: Included, Excluded.
      • Included: The What's New web part will only show items of the content types specified in the List of content types property.
      • Excluded: The What's New web part will show items of any content type, exluding the ones specified in the List of content types property.
    • Show header row: enables or disables the header row of the results list.
    • Group items on date: enables or disables grouping of the results based on their date
    • Allow group collapse: enables or disables the ability to collapse the groups if the Group items on date setting is enabled.
  • Columns to show: you can choose which columns you want to show in the results list
    • Modified: the Modified timestamp, including the date and time
    • Time: the modified time (excluding the date part)
    • Date: the modified date (excluding the time part)
    • List: a link to list or document library containing the item
    • Site: a link to the site of the list or document library containing the item
    • Modified By: the account who changed or added the item

WhatsNewSettings.jpg

Last edited Jan 21, 2009 at 2:02 PM by JanTielens, version 5

Comments

Laderico Oct 16, 2013 at 4:06 PM 
Hi,

Where can i find source code for what's new webpart?

Best regards,
E. Uwit

thvdog Feb 28, 2013 at 6:36 PM 
Time displayed is off by several hours

ElectroRich Sep 30, 2009 at 11:56 AM 
Where can you put this code in as i too am struggling with the List of content types.
thanks,

Solo_810 Feb 4, 2009 at 1:24 PM 
@chanthy
Long time to reply to ur question....anyway I downloaded the source code and i found the problem about adding multiple content types....it didn't work.
To fix this problem.....@ the source code itself:

@ 1- Inside this method " private string GetQueryContentTypePart(string contentTypes, ContentTypesOptions option) "
2- Replace the "Switch" statment with:
---------------------------------------------------------
switch (cts.Length)
{
case 0:
//queryContentTypePart = "<IsNotNull><FieldRef Name='ContentType' /></IsNotNull>";
queryContentTypePart = string.Format(
" <And>" +
" <Geq><FieldRef Name='Modified' /><Value Type='DateTime'>{0}</Value></Geq>" +
" <IsNotNull><FieldRef Name='ContentType' /></IsNotNull>" +
" </And>",
modDateCaml);
break;
case 1:
queryContentTypePart = string.Format(
" <And>" +
" <And>" +
" {2}" +
" <{1}><FieldRef Name='ContentType' /><Value Type='Text'>{0}</Value></{1}>" +
" </And>" +
" <IsNotNull><FieldRef Name='ContentType' /></IsNotNull>" +
" </And>",
cts[0], op, modDateCaml);
break;

case 2:
queryContentTypePart = string.Format(
" <And>" +
" <Or>" +
" <{2}><FieldRef Name='ContentType' /><Value Type='Text'>{0}</Value></{2}>" +
" <{2}><FieldRef Name='ContentType' /><Value Type='Text'>{1}</Value></{2}>" +
" </Or>" +
" <And>" +
" {3}" +
" <IsNotNull><FieldRef Name='ContentType' /></IsNotNull>" +
" </And>" +
" </And>",
cts[0], cts[1], op, modDateCaml);
break;
case 3:
queryContentTypePart = string.Format(
" <And>" +
" <Or>" +
" <Or>" +
" <{3}><FieldRef Name='ContentType' /><Value Type='Text'>{0}</Value></{3}>" +
" <{3}><FieldRef Name='ContentType' /><Value Type='Text'>{1}</Value></{3}>" +
" </Or>" +
" <Or>" +
" {4}" +
" <{3}><FieldRef Name='ContentType' /><Value Type='Text'>{2}</Value></{3}>" +
" </Or>" +
" </Or>" +
" <IsNotNull><FieldRef Name='ContentType' /></IsNotNull>" +
" </And>", cts[0], cts[1], cts[2], op, modDateCaml);
break;
case 4:
queryContentTypePart = string.Format(
" <And>" +
" <Or>" +
" <Or>" +
" <{4}><FieldRef Name='ContentType' /><Value Type='Text'>{0}</Value></{4}>" +
" <{4}><FieldRef Name='ContentType' /><Value Type='Text'>{1}</Value></{4}>" +
" </Or>" +
" <Or>" +
" <{4}><FieldRef Name='ContentType' /><Value Type='Text'>{2}</Value></{4}>" +
" <{4}><FieldRef Name='ContentType' /><Value Type='Text'>{3}</Value></{4}>" +
" </Or>" +
" </Or>" +
" <And>" +
" {5}" +
" <IsNotNull><FieldRef Name='ContentType' /></IsNotNull>" +
" </And>" +
" </And>", cts[0], cts[1], cts[2], cts[3], op, modDateCaml);
break;
case 5:
queryContentTypePart = string.Format(
" <And>" +
" <Or>" +
" <Or>" +
" <{5}><FieldRef Name='ContentType' /><Value Type='Text'>{0}</Value></{5}>" +
" <{5}><FieldRef Name='ContentType' /><Value Type='Text'>{1}</Value></{5}>" +
" </Or>" +
" <Or>" +
" <{5}><FieldRef Name='ContentType' /><Value Type='Text'>{2}</Value></{5}>" +
" <{5}><FieldRef Name='ContentType' /><Value Type='Text'>{3}</Value></{5}>" +
" </Or>" +
" </Or>" +
" <Or>" +
" <And>" +
" <{5}><FieldRef Name='ContentType' /><Value Type='Text'>{4}</Value></{5}>" +
" {6}" +
" </And>" +
" <IsNotNull><FieldRef Name='ContentType' /></IsNotNull>" +
" </Or>" +
" </And>",
cts[0], cts[1], cts[2], cts[3], cts[4], op, modDateCaml);

break;
}
---------------------------------------------------------
the error at the CAML statment as "JanTielens" query the items with content type equals to all the content types you entered at "List of content types":
Example:
List of content types : Page;Welcome Page;Article Page
@ Jan Code : No result; coz each item should has content type(Page) AND content type(Welcome Page) ....etc.
@ My Code: You will get what you want; coz i used "Or" instead of "And".

I hope this will help.

chanthy May 22, 2008 at 11:08 PM 
I can't seem to get the "List of content types" to work correctly. Everytime I try to add another content type I get the message "There are no items to show in this view." I am using the ; symbol, but it doesn't seem to work. Can anyone help?