Working with Web Pages in Microsoft SharePoint Foundation 2010

  • 12/15/2011

Adding a Web Part from the Web Part Pane

As you customize your site, you might decide to add information other than static text and images. This information may be stored in lists or libraries or in some other data source. You can do this by adding Web Parts. You can insert Web Parts on multiple pages and also insert a Web Part multiple times on the same web page. SharePoint Foundation provides built-in Web Parts for each website created. Two types of Web Parts are most commonly used via the browser:

  • XSLT List View (XLV) Web Parts Web Parts that display the contents of lists and libraries. These Web Parts are displayed in the Lists and Libraries category. Each time that data in the list or library changes, the changes are reflected in the XLV Web Part. SharePoint Foundation introduced this new version of the List View Web Part (LVWP), which uses Extensible Stylesheet Language Transformation (XSLT) to define how to display the data from lists or libraries.

  • Built-in Web Parts Web Parts that display other content. There are 13 built-in Web Parts displayed in five categories.

The 13 built-in Web Parts available on websites created from the Team site, Blank site, or Document Workspace template are summarized in the following table.

Category

Web Part

Description

Content Rollup

Relevant Documents

Use this Web Part to display documents that are relevant to the current user. This Web Part generates a personalized view of documents checked out by, created by, or last modified by the current user. You can configure the Web Part to use more than one criterion. To improve the performance of the Relevant Documents Web Part in a large-scale document management environment, use Column indexing on the Modified By, Created By, or Checked Out By columns. Make sure that the Show Items From The Entire Site Collection check box is not selected when configuring the Web Part.

XML Viewer

Use this Web Part for Extensible Markup Language (XML) with Extensible Stylesheet Language (XSL) to define how the XML is displayed. You might use the XML Web Part to display structured data from database tables or queries as well as XML-based documents.

Forms

HTML Form Web Part

Use this Web Part if you want to send data to another Web Part via a Web Part connection. The content displayed in the other Web Part depends on the data that it receives.

Media and Content

Content Editor

Use this Web Part to add content to a Web Part page such as formatted text, tables, and images. This Web Part allows you to add content by using a Rich Text Editor or HyperText Markup Language (HTML) source editor. The HTML <FORM> element is not allowed in the Content Editor Web Part. If you need to add a Web Part that uses the <FORM> element, consider using the Page Viewer or Form Web Part.

Image Viewer

Use this Web Part to display pictures and photos. This Web Part is included by default on the home Web Part page of many sites to display a logo.

Page Viewer

Use this Web Part to display the content of a linked resource such as a website, web pages, files, or folders. In this way, you can display an entire web page within a Web Part. The linked content is isolated from other content on the web page, and hence the content is displayed asynchronously from the rest of the page. This means that you can view and use other content in other Web Parts on the page even if the link in this Web Part happens to take a long time to return its content. Also use this Web Part if you want to retrieve data from a server that requires authentication.

Picture Library Slideshow Web Part

Use this Web Part to display a slideshow of images and photos from a picture library. The images can be displayed in a random or sequential order, which you can configure using the Web Part tool pane.

Silverlight Web Part

Use this Web Part to display a Silverlight application. Silverlight applications can be created using Visual Studio 2010 or Microsoft Expression Blend.

Social Collaboration

Site Users

Use this Web Part to view a list of the site users and their online status.

User Tasks

Use this Web Part to display tasks that are assigned to the current user.

What’s New

Available on sites created from the Group Work Site template. Use this Web Part to show new information from specified lists and libraries, where the [Modified] column is configured as an Indexed column.

Whereabouts

Available on sites created from the Group Work Site template. Use this Web Part to display Whereabouts information.

SQL Server Reporting

SQL Server Reporting Services Report Viewer

Use this Web Part to view Microsoft SQL Server Reporting Services reports.

In this exercise, you will customize the home page of a SharePoint site. You will add an XLV Web Part and restore a Web Part from the Web Part Page Gallery.

  1. Click the Edit icon that is displayed to the left of the Browse tab.

    httpatomoreillycomsourcemspimages1755459.jpg
  2. Place the cursor in the top content area, if it is not already there, and then click the Insert tab.

  3. Click Existing List in the Web Parts group.

    httpatomoreillycomsourcemspimages1755147.png

    The Web Parts pane is displayed at the top of the page below the Ribbon. A Web Part for each list or library created for this site is displayed.

    httpatomoreillycomsourcemspimages1755513.jpg
  4. In the Web Parts pane, click the list that contains data, such as Furniture Price List, and then click Add.

    A Loading dialog briefly appears, and then the Furniture Price List Web Part is added to the page.

    httpatomoreillycomsourcemspimages1755515.png
  5. Place the cursor in the top content area in front of the Furniture Price List Web Part, if it is not already there, and then, on the Insert tab, click New List.

    httpatomoreillycomsourcemspimages1755517.jpg

    The Create List dialog appears.

  6. In the List Title box, type Financial Links. Under Tracking, click Links, and then click OK.

    The Financial Links list is created, and a Financial Links Web Part is displayed on the page.

  7. Place the cursor in the top content area, if it is not already there, and then, on the Insert tab, click Web Part.

    httpatomoreillycomsourcemspimages1755519.jpg

    The Web Parts pane is displayed at the top of the page below the Ribbon.

  8. Under Categories, click Media and Content, and then, under Web Parts, click Picture Library Slideshow Web Part.

    httpatomoreillycomsourcemspimages1755521.jpg
  9. Click Add.

    The Picture Library Slideshow Web Part is placed above the Furniture Price List Web Part.

  10. On the Page tab, click Save & Close.