Creating and Modifying Web Pages in Microsoft SharePoint Designer 2010

  • 12/23/2010

Modifying a List View Page

When you create a list or library, a number of views are created. These views are Web Part pages based on files from the site’s defintion—that is, they point to files in the TEMPLATE folder on the Web servers. These Web Part pages use an XLV Web Part to display all or a subset of the contents of a list or library depending on criteria defined by the metadata. These views allow you to display information in different formats without having to enter the information more than once, thereby enabling you and other users to find information easily. Each view page contains one Web Part zone named Main that contains one XLV Web Part.

The pages that define views are not stored in the Site Pages library. In lists they are stored immediately below the list container. In libraries, by using the All Files gallery page or mini-gallery, you can see them in the Forms folder for the library. By using SharePoint Designer or the browser, you can modify the XLV Web Part of view pages, and you can add other Web Parts to the Main Web Part zone. SharePoint Designer provides additional customization options, such as inserting and customizing static text and images outside the Web Part zone, but you need to display the view page in advanced edit mode. You can add additional Web Part zones and, in advanced edit mode, add Web Parts outside Web Part zones.

In this exercise, you modify the All Items view of a tasks list.

  1. In the Navigation pane, click Lists and Libraries, and then click Tasks.

    The tasks list settings page is displayed in the workspace. In the Views area, six view pages are listed: Active Tasks, AllTasks, By Assigned To, By My Groups, Due Today, and My Tasks.

  2. In the Views area, click All Tasks to open the page in edit mode. The workspace tab is labeled AllItems.aspx.

  3. In the middle of the page, click Type.

    A blue border with the label Main appears, within which is the label <webpartpages:XsltListViewWebPart>. This label indicates that an XLV Web Part is contained within the Web Part zone Main. A purple-bordered rectangle surrounds the Web Part zones, labeled PlaceHolderMain (Custom). The ribbon contains the List View Tools tabs.

  4. httpatomoreillycomsourcemspimages1806265.jpg On the Options tab, click Add/Remove Columns in the Fields group.

    The Displayed Fields dialog box opens.

  5. Under Available fields, hold down the CTRL key, and select two fields, such as the Start Date and Task Group fields. Click Add.

    The two fields, Start Date and Task Group, appear under Displayed Fields.

  6. Click Start Date, and then click Move Up three times so that Start Date is above Due Date.

    httpatomoreillycomsourcemspimages1806267.jpg
  7. Click OK to close the Displayed Fields dialog box.

    The workspace is displayed with the Start Date and Task Group columns visible in the Tasks XLV Web Part.

    httpatomoreillycomsourcemspimages1806269.jpg
  8. httpatomoreillycomsourcemspimages1806059.jpghttpatomoreillycomsourcemspimages1806049.jpg Click Save, and then close the AllItems.aspx tab by clicking the Close icon at the top right of the workspace. The site settings page is displayed in the workspace, and the Close icon is now dimmed.