Learn more about SQL Server tools

mssqltips logo
giveaway
 

Tutorials          DBA          Dev          BI          Career          Categories          Webcasts          Whitepapers          Today's Tip          Join

Tutorials      DBA      Dev      BI      Categories      Webcasts

DBA    Dev    BI    Categories

 

Creating SharePoint Web Part Pages


By:   |   Read Comments   |   Related Tips: > Sharepoint

Problem

By default, SharePoint (WSS3 and MOSS 2007) builds a main page for every site. However, I would like to have multiple web pages in a particular site so I can build different environments for various projects and teams within a single site.

Solution
It would be common for different teams to want to see different filtered 'views' of the same lists or libraries. To present a set of filtered content to a distinct set of users, you can build a "Web Part Page" for each project or team. Each page can contain multiple web parts of existing content in a filtered view

In this article I will show how to create a Web Part Pages library, creating a few new Web Part Pages, and then describe how different teams can look at the same target (calendar and document) resources using a pre-filtered view for a particular team. These pre-filtered views will show only the data needed for each team.

Building a spot for the Web Part Pages

In a WSS3 or MOSS 2007 site, click on "View All Site Content" in the Quick Launch area (left).

Then click the "Create" link. 

Choose "Document Library" as the object type.

Give the document library a name. In a production environment, in the Navigation choice, you may choose to leave this library out of the Quick Launch area and choose a different method of navigating. This option can be changed later. It makes no difference for the purpose of this exercise.

Important: Choose "Web Part Page" as the "Document Template".

Adding Web Part Pages

In the new library, click the "New" dropdown and choose "New Document". 

Give the Web Part Page a Title and then choose a desired layout. The little graphic on the bottom left shows an approximation of what the page layout will look like. With just the web browser*, you cannot change the layout style, so be deliberate with the choice. Don't worry too much, you can always just delete the page and create a new one.

(* With SharePoint Designer, you can add or remove Web Part Zones. What's a Web Part Zone? It's the little areas on the Web Part Page where you can place web part objects. Each of these say "Add a web part" when you are in page edit mode.)

The next page offers a blank "Web Part Page", where you can add web content as desired. 

After creating a few of these pages, I end up with a document library that looks like this: 

Displaying Different Filtered Views of the Same Resources

For illustration purposes, I have created one additional document library and one calendar. In each, I added a field called Project Name. Some of the documents and calendar events for a (hypothetical) Project Red, and some are for Project Orange. I used this extra field to create a couple of extra filtered views.

While a complete tutorial on how to create SharePoint views is outside the perview of this article, here is an example of how I created the Project Red view for the document library. 

 

The "All Projects" Web Part Page shows all items without any filtering. There are are a total of 4 documents and 2 calendar items. 

The Project Orange Web Part Page shows only those documents and calendar events having to do with Project Orange.  

Similarly, the Project Red Web Part Page only shows items for Project Red. 

 

Summary

This tip shows how you can create a special library to host Web Part Pages and how you can use these to show filtered content for different functions. Using this method, you can consolidate your content onto centralized lists, while offering filtered views of the content for different functions, teams or projects, etc.

Next Steps
  • Check out MSSQLTips.com for great information about Microsoft SQL Server.


Last Update:






About the author
MSSQLTips author Rob Fisch Rob Fisch has worked with SQL Server since version 6.5 as a dba, developer, report writer and data warehouse designer.

View all my tips





More SQL Server Solutions











Post a comment or let the author know this tip helped.

All comments are reviewed, so stay on subject or we may delete your comment. Note: your email address is not published. Required fields are marked with an asterisk (*).

*Name    *Email    Notify for updates 


SQL tips:

*Enter Code refresh code     



Learn more about SQL Server tools