People get lazier every day. I guess it’s some kind of evolution. A few thousand years ago we used to make our own tools. We had to go out into the woods to hunt for a meal,  and with a bit of luck we had a piece of meat at night. Nowadays we drive to work, bang on the keyboard for 8 hours, drive back, and at home a not too scanty meal magically appears on the table. Did we hunt for that? Did we make our own car? Did we make our own PC? Did we even make our own OS? We didn’t even sweat! In the history of mankind someone apparently was smart enough to not kill the caught animal, but let it jump on top of a female of the same kind, and then wait for the beef to spawn on his plate. People get smarter, so they can be lazier. Evolution.

Now back to SharePoint. SharePoint is the perfect platform for the current generation of people. We can find all of our documents, tasks and emails in one place. People even expect one overview for content spread across multiple sites. To achieve this kind of content aggregation, SharePoint 2010 has a few tools available.

In the latest SharePoint eMagazine of the DIWUG (Dutch Information Workers User Group) Brett Lonsdale writes about the multiple tools SharePoint has, that can achieve content aggregation over multiple lists, sites, site collections and even farms. I would really recommend reading the article, but for the lazy (or more evolved) readers, here is a summary.

  • Content by Query Web Part – This is part of the Publishing Infrastructure Feature. It allows you to aggregate content from lists of the entire site collection. This can be done by simple clicking and selecting. This also applies to filtering, grouping and sorting. Out of the box there are multiple styles available, but you can also create your own style by copy and modify a XSL in the Style Library.
    The CQWP is a very powerful tool for content in one site collection. It won’t work with multiple site-collections.
  • Relevant Documents Web Part – This is a very simple web part which doesn’t allow much configuring. You can show your last modified documents, or the documents you created, but it doesn’t get more exciting than that. Oh, and you have to keep in mind that it’s only for the current site, not for the site collection.
  • RSS Feed Web Part – The RSS Feed web part can show the RSS feed of a SharePoint List. If you are using Kerberos you can get the RSS feed of a list in the web part. This is useful across site collections.
  • Data View Web Part – This web part can be found in every SharePoint 2010 version, even foundation. The RSS feed can also be used in this web part. Even more, multiple RSS feeds can be merged, talking about content aggregation. In SharePoint designer there is even more available with this web part. Data sources can be web services, databases, xml, etc.
  • Core Search Results Web Part – This web part is useful when you want to aggregate content of multiple site collections. This can be done by configure a search scope with properties and rules in central admin. One big disadvantage is that the content is as up to date as the latest crawl.
  • Calendar Overlays – In a SharePoint calendar you can get an overlay using the Calendar Overlays button on the ribbon. This function is pretty straightforward.
The Content Query Web Part is a very powerful OOTB tool for content aggregation. If you want even more then use the Data View Web Part in combination with SharePoint Designer.

In my previous post on how to design and deploy a custom SharePoint master page I explained how to create an own branded master page and how to deploy that master page to your SharePoint site. Now I first stumbled upon the problem that the master page doesn’t get automatically applied to newly created (sub)sites, and secondly I received a comment from a reader describing the exact same problem. So I decided to write my findings and solution to the open world. Here it is.

The problem is very simple: You create your own master page, you apply your master page to all sites and it does that, nice, but when you create a new site you just get the old v4.master on that site and not your custom master page. Everyone with this problem, if you followed my previous post or not, can follow this solution. It doesn’t even matter what SharePoint version you’re using.

When I Googled for a bit, I found out that there is no out-of-the-box-solution for this and a lot of guys use Visual Studio to solve this. You could program an event receiver that sets your master page to every new site. Or you could program a Feature that holds your master page and apply that feature to a site definition. But I find that a bit heavy and not very flexible solution. So I played around a bit and found a solution myself without the use of Visual Studio or programming at all.

Here we go:

You should have your master page deployed to the main sites master pages gallery. You should see your masterpage when going to http:///_catalogs/masterpage/Forms/AllItems.aspx

(Yes I’m using Chrome)

Now create a new blank Team Site using whatever name you like (you won’t see it in the end).

Now go to Site Settings and click “Save site as template” under Site Actions and go save the site as a template.

On the next screen click on the link to go to the solution gallery. In the solution gallery just click on the name of your just created template to download it. Save it somewhere where you can easily find it.

Did you know that as WSP is in fact just a CAB file? That’s why we need a tool that can extract and recreate our wsp. I used the tool ACDZip, which has a free x-days trial. You can get it here A reader has also mentioned the tool IZArc, which is free. A great alternative.

Now find your file and rename it from TemplateWithoutMyMasterPage.wsp to, you should see your icon change.

Open the file with ACDZip and extract the ONet.xml file from theWebTemplateONet.xml to a location where you can edit it easily.


Now edit the following line of code

masterpage/v4.master" ThemedCssFolderUrl="">


<Configuration ID="0" Name="Default" MasterUrl="/_catalogs/masterpage/mymaster.master" ThemedCssFolderUrl="">

Don’t forget the slash before _catalogs. This will ensure that the mymaster.master from the master page gallery on the root of the site gets used.

Save the file and put it back in the archive (drag and drop), it will automatically rebuild the archive. Rename the file back to a wsp file, I also used another file name.

Upload the file into the Solution Gallery by using the Upload Solution button on the ribbon of Solutions.


In the next screen you must upgrade the solution.

You can now use the new template to create a site with your masterpage. Go ahead and try. Site Actions, New Site, scroll down and select the template, fill in a title and url and create the site.

You should now have your master page automatically applied.