Custom Display: Announcement Roll-Up with Standard SharePoint Look and Feel

This section walks through the process of creating Announcement roll-ups that, while appearing like standard SharePoint Announcement roll-ups, provide you all the extra features of CorasWorks roll-ups. For the purposes of this process, the CorasWorks roll-up, Company Announcements, will be recreated as it appears in the CorasWorks Enterprise Showroom at http://enterprise.corasworks.net/Topics/defaultca.aspx.

How it Works

These procedures require one list and one web part:

Announcements List

Announcement Spreadsheet Roll-Up Advanced web part – This does all of the work in this solution.  It creates a table containing the items in the Announcements list, formatting the items just as they would be formatted in a standard SharePoint roll-up.  For this solution, the web part must be created by modifying the DWP file of a standard Announcement Spreadsheet Advanced Web Part.

A specially modified Announcement Spreadsheet Roll-Up Advanced web part (Company Announcements - Standard.dwp) displays the items in the Announcements list.  The table is hard-coded in the Display property of the Company Announcements - Standard.dwp file (click here).

Take a look at the Display property:

<Display xmlns="CorasWSC.Announcement.SpreadSheet.RollUp"><![CDATA[<table cellpadding=0 cellspacing=0 width=100%><tr><td colspan=2><b>Sort By:</b> <%Title Header%>| <%Body Header%>| <%Created By Header%>| <%Created Header%></td></tr><tr><td colspan=2>&nbsp;</td></tr><END><tr><td width=70% align=left><b><a href="<%DisplayItemURL%>"><%Title%></a></b></td><td width=30% align=right><%Created%></tr><tr><td colspan=2 align=left>by&nbsp; <%Created By%></td></tr><tr><td colspan=2><%Body%></td></tr><tr><td colspan=2>&nbsp;</td></tr><END></table>]]></Display>

Remembering that certain symbols (“<”, “>”, and “&”) had to be translated for use in the .dwp file, and though you should never include such symbols in a .dwp file, it may be useful to see Company Announcements.dwp written with symbols that are more easily understood:

<Display xmlns="CorasWSC.Announcement.SpreadSheet.RollUp"><table cellpadding=0 cellspacing=0 width=100%><tr><td colspan=2><b>Sort By:</b> <%Title Header%>| <%Body Header%>| <%Created By Header%>| <%Created Header%></td></tr><tr><td colspan=2>&amp;nbsp;</td></tr><END><tr><td width=70% align=left><b><a href="<%DisplayItemURL%>"><%Title%></a></b></td><td width=30% align=right><%Created%></tr><tr><td colspan=2 align=left>by&amp;nbsp; <%Created By%></td></tr><tr><td colspan=2><%Body%></td></tr><tr><td colspan=2>&nbsp;</td></tr><END></table></Display>

If you look at the table in Spreadsheet Roll-Up Advanced, you will see that a number of fields from the List being searched are referenced with a “%”, both before and after the item.  These include both the field headers (%Title Header%, %Body Header%, %Created By Header%, %Created Header%) and the field values (%DisplayItemURL%, %Title%, %Created%, %Created By%, %Body%).  When working with an Announcements list, these are the fields available to you while building your custom solution.

 

IMPORTANT! When copying and pasting from the online help into FrontPage, hard returns may be inserted. These will need to be removed to avoid any errors.

 

Building it

The Scenario

These procedures being with the assumption that there is a site at http://site/ and there is a standard announcements list, Company Announcements.  After populating the announcements list with data, you realize that you want the data to display a little bit differently than a standard Announcement Spreadsheet Roll-Up Advanced permits; you want your announcements data rolled up as on a standard SharePoint roll-up.  To do this, the Display property of the web part must be edited.

Step 1: Create the Company Announcements Roll-Up

1.  Add an Announcement Spreadsheet Roll-Up Advanced web part to the aone where you want the roll-up to be displayed.

2.  Export the your roll-up as a .dwp file

Click on the Actions menu and then Export…

Save the file on your computer as Company Announcements - Standard.dwp

3.  Delete the generic Announcement Spreadsheet Roll-Up Advanced web part from your site.

Click on the Actions menu and then Delete

Click OK to confirm

4.  Edit Company Announcements - Standard.dwp on your computer

Change the title of the web part by replacing the text between the <Title></Title> tags with Company Announcements

Insert the following lines between the last property tag: <TypeName></TypeName>, and before the closing tag, </WebPart> and then save your .dwp file, Company Announcements - Standard.dwp

 

<Display xmlns="CorasWSC.Announcement.SpreadSheet.RollUp"><![CDATA[<table cellpadding=0 cellspacing=0 width=100%><tr><td colspan=2><b>Sort By:</b> <%Title Header%>| <%Body Header%>| <%Created By Header%>| <%Created Header%></td></tr><tr><td colspan=2>&nbsp;</td></tr><END><tr><td width=70% align=left><b><a href="<%DisplayItemURL%>"><%Title%></a></b></td><td width=30% align=right><%Created%></tr><tr><td colspan=2 align=left>by&nbsp; <%Created By%></td></tr><tr><td colspan=2><%Body%></td></tr><tr><td colspan=2>&nbsp;</td></tr><END></table>]]></Display>

  <SearchAbove1Site xmlns="CorasWSC.Announcement.SpreadSheet.RollUp">true</SearchAbove1Site>

  <ReturnType xmlns="CorasWSC.Announcement.SpreadSheet.RollUp">los</ReturnType>

  <ShowCorasWorks xmlns="CorasWSC.Announcement.SpreadSheet.RollUp">false</ShowCorasWorks>

  <ListTemplates xmlns="CorasWSC.Announcement.SpreadSheet.RollUp">&lt;?xml version='1.0' ?&gt;&lt;Lists&gt;&lt;List&gt;&lt;ListType&gt;Announcements&lt;/ListType&gt;&lt;ListTypeName&gt;SA&lt;/ListTypeName&gt;&lt;NumberOfFields&gt;18&lt;/NumberOfFields&gt;&lt;OrderBy&gt;Title, ModifiedDATE, CreatedDATE, CreatedBy, ModifiedBy, Body, ExpiresDATE&lt;/OrderBy&gt;&lt;ListFields&gt;Title,Modified~DATE,Created~DATE,Created By,Modified By,Body,Expires~DATE&lt;/ListFields&gt;&lt;DisplayPer&gt;,,,,,,&lt;/DisplayPer&gt;&lt;SearchFields&gt;Title,Modified~DATE,Created~DATE,Created By,Modified By,Body,Expires~DATE&lt;/SearchFields&gt;&lt;/List&gt;&lt;/Lists&gt;</ListTemplates>

 

5.  Import the modified web part to your site.

Click Modify Shared Page/Add Web Parts/Import

Enter the name and location of the .dwp file or click Browse to find it on your computer

Click Upload.

6.  Drag the uploaded web part to the zone where you want the roll-up to be displayed.

7.  Select the Company Announcements list in the web part’s administration interface.

Back to Top

 

Announcement Roll-Up with Standard SharePoint Look and Feel – Company Announcements - Standard.dwp

<?xml version="1.0" encoding="utf-8"?>

<WebPart xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/WebPart/v2">

  <Title>Announcement-Spreadsheet Roll-Up Advanced</Title>

  <FrameType>None</FrameType>

  <Description>This Web Part will rollup all Announcement Lists into a single Spreadsheet form. From here users can manage, filter, and search Announcement list items.</Description>

  <IsIncluded>true</IsIncluded>

  <ZoneID>{D40E6C45-76FF-4392-8187-9EE220058BAC}</ZoneID>

  <PartOrder>2</PartOrder>

  <FrameState>Normal</FrameState>

  <Height />

  <Width />

  <AllowRemove>false</AllowRemove>

  <AllowZoneChange>true</AllowZoneChange>

  <AllowMinimize>true</AllowMinimize>

  <IsVisible>true</IsVisible>

  <DetailLink />

  <HelpLink>http://central.workplace.corasworks.net/support/WebPartHelp/CWSCARSS.aspx</HelpLink>

  <Dir>Default</Dir>

  <PartImageSmall />

  <MissingAssembly>This Web Part has failed to load due to a missing software file.  Please contact CorasWorks (http://www.corasworks.net) and provide them with the name of the Web Part [Announcement-Spreadsheet Roll-Up Adv] and the URL in your browser.</MissingAssembly>

  <PartImageLarge>_WPR_/Announcement.gif</PartImageLarge>

  <IsIncludedFilter />

  <Assembly>CorasWSC.Announcement.Spreadsheet.Rollup.Adv, Version=51.0.30.3, Culture=neutral, PublicKeyToken=126c6fd56c7a3635</Assembly>

  <TypeName>CorasWSC.Announcement.SpreadSheet.RollUp.Adv</TypeName>

  <Display xmlns="CorasWSC.Announcement.SpreadSheet.RollUp"><![CDATA[<table cellpadding=0 cellspacing=0 width=100%><tr><td colspan=2><b>Sort By:</b> <%Title Header%>| <%Body Header%>| <%Created By Header%>| <%Created Header%></td></tr><tr><td colspan=2>&nbsp;</td></tr><END><tr><td width=70% align=left><b><a href="<%DisplayItemURL%>"><%Title%></a></b></td><td width=30% align=right><%Created%></tr><tr><td colspan=2 align=left>by&nbsp; <%Created By%></td></tr><tr><td colspan=2><%Body%></td></tr><tr><td colspan=2>&nbsp;</td></tr><END></table>]]></Display>

  <SearchAbove1Site xmlns="CorasWSC.Announcement.SpreadSheet.RollUp">true</SearchAbove1Site>

  <ReturnType xmlns="CorasWSC.Announcement.SpreadSheet.RollUp">los</ReturnType>

  <ShowCorasWorks xmlns="CorasWSC.Announcement.SpreadSheet.RollUp">false</ShowCorasWorks>

  <ListTemplates xmlns="CorasWSC.Announcement.SpreadSheet.RollUp">&lt;?xml version='1.0' ?&gt;&lt;Lists&gt;&lt;List&gt;&lt;ListType&gt;Announcements&lt;/ListType&gt;&lt;ListTypeName&gt;SA&lt;/ListTypeName&gt;&lt;NumberOfFields&gt;18&lt;/NumberOfFields&gt;&lt;OrderBy&gt;Title, ModifiedDATE, CreatedDATE, CreatedBy, ModifiedBy, Body, ExpiresDATE&lt;/OrderBy&gt;&lt;ListFields&gt;Title,Modified~DATE,Created~DATE,Created By,Modified By,Body,Expires~DATE&lt;/ListFields&gt;&lt;DisplayPer&gt;,,,,,,&lt;/DisplayPer&gt;&lt;SearchFields&gt;Title,Modified~DATE,Created~DATE,Created By,Modified By,Body,Expires~DATE&lt;/SearchFields&gt;&lt;/List&gt;&lt;/Lists&gt;</ListTemplates>

</WebPart>

 

Back to Top