calendars.jpg

Aggregating SharePoint Events

One of the requirements that we have received from our customers building Intranet Portals is the ability to aggregate data to the Home site from Calendars and Announcements that “live” on child sites such as HR and IT. Obviously, one way to accomplish this would be to create Announcements and Calendars lists on the Home site and post duplicate entries to these lists when entries are created in the Calendar and Announcement lists in HR and IT. Of course this is not a very efficient way to do things and has a greater chance of data entry errors.

Using MOSS and the Content Query Web Part, aggregating data from lists located in child sites is now possible without the need for unnecessary duplication.

To leverage this capability in MOSS, first make sure the Content Query Web Part shows up in your list of available Web Parts. If not, you likely need to turn on the Office SharePoint Server Publishing feature on the site by going to Site Actions, Site Settings, Site Features and activating the Office SharePoint Server Publishing feature as demonstrated below:

Click activate. Under normal circumstances, the screen will refresh and you will notice the blue “Active” indicator next to the feature. However, in some cases, you might see the screen below which indicates an additional step is necessary.

To install the Office SharePoint Server Publishing Infrastructure, navigate to the site collection. Select Site Actions, Site Settings, Site Collection Features to see the following screen.

Choose to Activate the Office SharePoint Server Publishing Infrastructure feature for the site collection. The screen shot below demonstrates a successful activation.

Now that the Office SharePoint Server Publishing Infrastructure is in place, you can now activate the Office SharePoint Server Publishing feature by navigating to the Site Collection, selecting Site Actions, Site Features and then activating the Office SharePoint Server Publishing feature as demonstrated below.

After selecting Activate for the Office SharePoint Server Publishing feature, you should see the screen below

Now that the Content Query Web Part is available, you can add the Content Query Web Part to a page by navigating to a site, clicking Site Actions, edit page and then selecting Add a Web Part in one of the Web Part zones as shown below.

After you click, Add a Web Part, you will see the following dialog where you can scroll down and click the Content Query Web part

Now that you have successfully added the Content Query Web Part to a Web Part page, you can quickly see content from child sites on the Home Page by updating the Query configuration in the Web Part properties page. However, by default, the number of fields you have access to and the ability to alter the display and styling of this data is severely limited without applying some customization. The good news is that George Perantatos does a great job of describing these steps in detail, so I will merely point you to the ECM blog for these details http://blogs.msdn.com/ecm/archive/2006/10/25/configuring-and-customizing-the-content-query-web-part.aspx.

In addition, Heather Solomon, SharePoint MVP, provides more detailed instructions on creating a new style which can be found at http://www.heathersolomon.com/blog/articles/CustomItemStyle.aspx.

Now that I can view Calendar and Announcement data from child sites, I want to provide the content authors more control over the data that gets displayed on the Home site as well as some control over the duration that the data is displayed. To accomplish this, I add 3 new Columns to each list; Display on Home Page (Yes/No), Display Start Date (Date and Time) and Display End Date (Date and Time). These fields allow content authors to determine if they want this content to “bubble up” to the Home site and, if so, what dates to display this data. To make use of these fields in the Content Query Web Part query, I navigate back to the Content Query Web Part and update the filter section under the Query Properties to leverage these fields as shown below.

This wraps up the basics of aggregating Calendar and Announcement data using the Content Query Web Part. I hope you find this post helps stimulate some ideas for you to add value to your organization or customer.

Tim CoalsonAggregating SharePoint Events

Join the conversation

This site uses Akismet to reduce spam. Learn how your comment data is processed.