Recent

CSWP Simple Announcements

Using the Content Search Web part and a CSS file you can create a simple Announcements list that pulls announcements from multiple sites or announcements lists.
cswp-simple-announcement-1

Creating Simple Announcement CSWP listing

1. Download and extract the css and announcement icon from the zip file:
cswp-simple-announcements.zip

2. Add the css file and icon to the Site Assets library on the site.
cswp-simple-announcement-11

2. Edit a Site Page and Insert a Content Rollup > Content Search Web Part onto the page.

3. Edit the web part.
CSWP-simple-announcement-2.jpg

4. Click on the Change query option.
CSWP-simple-announcement-3.jpg

5. Click on the Switch to Advanced Mode option.
cswp-simple-announcement-4

6. Edit the Query text, your Query text should include the path to 2 or more sites or announcement lists enclosed in brackets and seperated by OR statements:
(path:”https://hostname/sites/sitename/lists/announcements/” OR path:”https://hostname/sites/testsite/”)

Then also include: SPContentType=Announcement
cswp-simple-announcement-12

7. Click on the Sorting tab, and sort by Created Descending:
cswp-simple-announcement-6

8. Select the number of announcements to show and the Two lines Item display template.
cswp-simple-announcement-7

9. Expand the Property Mappings section, check the Change the mapping of managed properties, for Line 2 select the Created property.  Click OK to save your web part.
cswp-simple-announcement-8

10.  Add a Media and Content > Script Editor web part to the page.

11.  Edit the Script Editor web part
cswp-simple-announcement-9

12. Click the Edit Snippet option, enter a link reference to the css file in the Site Assets library in the Script Editor.  The format of the link reference is included in the screenshot below, you can either use the full path to the file or ../SiteAssets/filename.

Click the Insert button to save the Script Editor.
cswp-simple-announcement-10

You should now have a simple announcements web part which pulls announcements from multiple lists and displays them ordered by the most recently created ones first:
cswp-simple-announcement-1

About Nick Hurst (84 Articles)
SharePoint and Nintex developer who strives to find easy to deploy and maintain solutions for business problems.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: