I got a quick question today from a client asking how to roll up blog posts. He wanted to display the latest blog posts from all of the blogs which executives have in the Site Collection, which is used as the organization’s Intranet.
He had the idea right, using a Data View Web Part (DVWP) with the DataSourceMode=”Crosslist” and the Webs Scope=”SiteCollection”. However, he got trapped by a cut and paste gotcha.
Since he wanted to only show the latest blog posts, he needed to set the correct value for ServerTemplate. The CAML he had copied had <Lists ServerTemplate=’104′></Lists>, which specifies lists which are based on the ‘Announcements list’ template. The value for the ‘Blog posts’ template is <Lists ServerTemplate=’301′></Lists>.
The possible values for ServerTemplate can be found in this MSDN support article, and here they are listed for ease of use:
- 100 Generic list (this means any Custom List)
- 101 Document library
- 102 Survey
- 103 Links list
- 104 Announcements list
- 105 Contacts list
- 106 Events list
- 107 Tasks list
- 108 Discussion board
- 109 Picture library
- 110 Data sources
- 111 Site template gallery
- 112 User Information list
- 113 Web Part gallery
- 114 List template gallery
- 115 XML Form library
- 116 Master pages gallery
- 117 No-Code Workflows
- 118 Custom Workflow Process
- 119 Wiki Page library
- 120 Custom grid for a list
- 130 Data Connection library
- 140 Workflow History
- 150 Gantt Tasks list
- 200 Meeting Series list
- 201 Meeting Agenda list
- 202 Meeting Attendees list
- 204 Meeting Decisions list
- 207 Meeting Objectives list
- 210 Meeting text box
- 211 Meeting Things To Bring list
- 212 Meeting Workspace Pages list
- 301 Blog Posts list
- 302 Blog Comments list
- 303 Blog Categories list
- 1100 Issue tracking
- 1200 Administrator tasks list