Adding a Web Part from a Web Part Gallery


As you customize your site, you might decide to add other information as well as remove some of the Web Parts on the Web Part Pages. This you can do by adding additional Web Parts. You can insert Web Parts on multiple pages and also insert a Web Part multiple times on the same Web page. Windows SharePoint Services provides built-in Web Parts for each Web site created Two types of Web Parts are most commonly use via the browser.

  • image from book List View Web Parts (LVWP)   Web Parts that display the contents of libraries and lists. Each time data in the list or library changes, the changes are reflected in the LVWP.

  • image from book Built-in Web Parts   Web Parts that display other content. There are eight built-in Web Parts.

The eight built-in Web Parts available on Web sites created from the Team site, Blank site, or Document Workspace templates are summarized in the following table.

Open table as spreadsheet

Web Part

Description

Content Editor Web Part

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 Parts.

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 is dependent on the data it receives.

Image Web Part

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 Web Part

Use this Web Part to display the content of a linked resource such as a Web site, 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 Part 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.

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.

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.

XML Web

Part 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.

Tip 

In addition to built-in Web Parts, you can create your own Web Parts by using tools, such as SharePoint Designer and Visual Studio .NET 2005. You can also import custom Web Parts.

SharePoint Designer allows you to add a Data Form Web Part (DFWP). In the previous version of Windows SharePoint Services, the DFWP was known as the Data View Web Part (DVWP) because it only allowed you to view data. The DFWP not only allows you to view data, but it can provide you with a form to write data to a variety of data sources such as Microsoft SQL Server databases, XML files, and Web services, as well as data held in SharePoint lists and libraries. SharePoint Designer provides a “What You See Is What You Get” (WYSIWYG) Extensible Stylesheet Language Transformation (XSLT) editor that the developer uses to format the Data Form Web Part. For example, you can create a DFWP that applies a style to a selected HTML tag or data values when the data meet specified criteria. If you use SharePoint Designer 2007 with the Furniture Sales List, you could highlight items when there are no units in stock.

In this exercise, you will customize the home page of a SharePoint site. You will add the Content Editor and List View Web Parts and restore a Web Part from the Web Part Page Gallery.

OPEN a SharePoint site. This exercise will use the http://wideworldimporters site, but you can use whatever site you wish. If prompted, type your user name and password, and click OK.

BE SURE TO complete the second exercise in this chapter before beginning this exercise. You must also have a list that contains data, such as the Furniture Price list created in Chapter 12, “Using Windows SharePoint Services with Excel 2007.” Alternatively, you can create a practice site for this chapter based on the Chapter 15 Starter.stp site template located in the Documents\Microsoft Press\SBS_WSSv3\Chapter 15 folder.

See “Using the Book’s CD” on page xix for instructions on how to create a practice site.

1. Click Site Actions and then click Edit Page. Internet Explorer displays the Web Part Page in edit mode.

2. In the Left Web Part Page zone, click Add a Web Part.

The Add Web Parts – Webpage Dialog box appears, which categorizes the Web Parts into either Lists and Libraries or All Web Parts.

image from book

3. In the Lists and Libraries area, choose Furniture Price List. In the All Web Parts area, under Miscellaneous, choose Content Editor Web Part.

4. Click Add.

5. Scroll down the page and hover over the icon to the left of Content Editor Web Part so that the mouse pointer changes to a four-way arrow. image from book

6. While holding down the mouse button, drag the Web Part to the area above the

As you move the Web Part, an orange rectangle containing the words Content Editor Web Part appears, and a dark orange horizontal line shows you where the Content Editor Web Part will be added.

image from book

Tip 

When using a browser, Web Parts can only be added to Web Part Page zones and are subsequently called dynamic Web Parts. When using a tool, such as SharePoint Designer, Web Parts can be added outside Web Part Page zones and are subsequently called static Web Parts. Using a static Web Part allows users to view the Web Part, but prevents them from interacting with or modifying the Web Part through the browser. This is helpful if you do not want users to be able to make any changes to either the Web Part or the way it is displayed on the page.

Internet Explorer redisplays the Web Part Page in edit mode with the Content Editor Web Part placed above the Furniture Price List Web Part.

7. In the Left Web Part Page zone, click Add a Web Part. The Add Web Parts – Webpage dialog box appears.

8. At the bottom of the dialog box, click Advanced Web Part gallery and options.

The Add Web Parts – Webpage Dialog box closes, and the Add Web Part tool pane appears displaying three Web Part Galleries: Closed Web Parts, <Site Name> Gallery and Server Gallery. You might need to scroll to the right to see the tool pane.

Web Part Galleries are containers in which Web Parts and Web Part templates are stored. The number in the bracket to the right of each gallery states the number of Web Parts contained in each gallery. The orange box around the Team Site Gallery indicates that you are viewing the contents of that gallery, and the Web Part List area lists those Web Parts that are held in the Team Site Gallery. This gallery contains a Web Part for each list or document library created for this site, plus the eight built-in Web Parts described earlier in this chapter.

image from book

9. In the Add Web Parts tool pane, click Closed Web Parts.

The Add Web Parts tool pane now lists the contents of the Closed Web Parts gallery. This gallery holds Web Parts that are temporarily removed from a Web Part Page by using the Close option. Currently, the Close Web Parts gallery contains only one Web Part-the Announcements List View Web Part that you removed in the second exercise of this chapter.

10. At the bottom of the Add Web Parts tool pane, click the arrow to the right of Add to:. From the drop-down list, click Right, and then click the Add button. image from book

When you use this method to add Web Parts to a Web Part Page, the Web Part is added to the top of the zone.

image from book

Tip 

The Closed Web Parts Gallery now contains no Web Parts because you have placed the Announcements List View Web Part back onto the Web Part Page. The Closed Web Parts gallery differs from other galleries in that it is a temporary storage space for Web Parts removed from a Web Part Page. You can liken the Closed Web Parts Gallery to the Recycle Bin; however, Web Parts are only placed here when the Close option is used. When the Delete option is used, the Web Part is permanently deleted from a Web Part Page.

Web Parts placed in other galleries act like templates. Web Parts from the other two galleries can be placed on a Web Part Page multiple times. Once a Web Part is placed on a Web Part Page, it can be uniquely customized, but the template from which the Web Part is created remains in the Web Part Gallery.

11. On the Add Web Parts tool pane title bar, click the Close button. image from book

The Add Web Parts tool pane closes and the Web page is displayed in edit mode.

CLOSE Internet Explorer.

Tip 

Web Parts can be badly written. If they are not thoroughly tested, you might find that a Web Part Page does not display when you add a Web Part to it. In such situations, append ?Contents=1 to the URL of the Web Part Page, such as http://wideworldimporters/default.aspx?contents=1. The Web Part Maintenance Page is displayed from which you can delete the offending Web Part.




Microsoft Windows Sharepoint Services Version 3. 0 Step by Step
Microsoft Windows Sharepoint Services Version 3. 0 Step by Step
ISBN: 735623635
EAN: N/A
Year: 2004
Pages: 201

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net