Using the Various SharePoint Web Parts


Now that you know the basics of working with Web Parts, it’s time to find out what Web Parts SharePoint has to offer. Each SharePoint Web Part is designed to aid in the display of content or information on your website. Some Web Parts display information based on the SharePoint site or environment, such as the Table of Contents Web Part, which is a navigational tool to display links to sites, lists, and libraries. Other Web Parts, such as the Content Editor Web Part you used in the previous section, can be configured to include content that users enter. Then there are Web Parts that work in combination with other Web Parts to control how a page displays information, such as the Filter Web Parts.

The previous section discussed operations that were common to most Web Parts. This section introduces each of the different Web Parts as well as some of the unique characteristics of each.

List and Library Web Parts

Some of SharePoint’s best collaborative features are the lists and libraries where teams can store and organize documents. Each time you create a list or library, SharePoint creates a corresponding Web Part in the gallery so you can place a view of the list or library on any Web Part page. This empowers you to channel information to key locations of your site where they make the most sense. For example, you may have a custom page on your site for reporting outstanding tasks. Therefore, you can add a Web Part of the tasks list to this page so users can view what tasks they should focus on next.

List and library Web Parts allow you to select views and display toolbars in order to access the information that you need. In Chapter 4, you learned how to create custom views to address your requirements for information display. In this section, you learn how you can use the List and Library Web Parts to display these views on any page you want. The first Try It Out shows you how to change the view of a List Web Part so the user can see only the information he or she needs. In addition, each List View Web Part has a toolbar associated with it to help you work with list data and settings. The toolbar has multiple states. The Full Toolbar exposes all the key functionality such as RSS feeds, Connect to Outlook, Export Spreadsheet, and Alert Creation as well as List Settings and Column or View creation. The Summary Toolbar allows users to add a new item to the list directly from the Web Part. You also have the option of not having a toolbar at all. You may select that option in cases where the page is intended primarily for reporting or viewing information and no interaction is expected or desired from viewers.

Tip 

For more on lists and libraries and how to manage them, see Chapters 2 through 4.

Try It Out-Change the View of a List Web Part

image from book

In this example, you add a Web Part to a page that is associated with the Tasks list of your team site. For every list or library on your site, SharePoint creates a Web Part to display the data associated with that list. For example, a default team site template contains several preconfigured lists and libraries such as a tasks list, links list, and Shared Documents library, and each has a corresponding Web Part in the Web Part gallery. So, if you create a tasks list called “Team Tasks,” a new Web Part appears in the site’s gallery called “Team Tasks.” You can add this Web Part to any Web Part page to display items from that list on the page.

You can have the available views associated with a list display in the Web Part. For example, you can have users see all tasks assigned to them, as well as those assigned to the entire team for the current day. You can, therefore, add the Tasks list to the page twice and select the appropriate view in each instance of the Web Part to suit your requirements.

  1. From the home page of a team site, select Site Actions image from book Edit Page. The site zones appear, as previously shown in Figure 7-6.

  2. Click the Add a Web Part button from the left Web Part zone. The Web Part Selection window appears.

  3. Select the Tasks List Web Part.

  4. Click the Add button. An instance of the Tasks List Web Part is added to your page.

  5. From the toolbar, select the Tasks Web Part’s Edit button.

  6. Select Modify Shared Web Part to expose the Web Part Properties tool pane.

  7. From the Selected View drop-down menu, select My Tasks as shown in Figure 7-17.

    image from book
    Figure 7-17

  8. Expand the Appearance group of the Web Part properties.

  9. Change the Title to My Personal Tasks.

  10. Click Apply.

  11. Click the OK button on the Web Part Properties tool pane to close it.

How It Works

In this Try It Out, you select the My Tasks view and then change the title of the Web Part to describe the view to be displayed. This informs users that they are viewing a subset of the data available in the list and not the default view of All Items. When you click OK in step 11, notice that your List View Web Part has changed slightly. You can use this same process for custom views you create for any list or library.

image from book

Try It Out-Change the Toolbar of a List Web Part

image from book

As mentioned previously, List Web Parts have an associated toolbar that offers users quick access to list data and settings. You can change these toolbars to offer more or less functionality depending on the properties you set. Your choices include Full, Summary, and No Toolbar. Before you change a toolbar that goes to a List Web Part, you should consider how users interact with the data stored in Web Parts. If you expect that the users will interact heavily with content and updates, they may need the Full toolbar.

  1. Select the down arrow on the right side of the title bar of the Tasks Web Part and click Modify Shared Web Part.

  2. From the Toolbar Type option, select Full Toolbar, an example of which is shown in Figure 7-18. You also have options for a Summary toolbar (as shown in Figure 7-19) and No Toolbar.

    image from book
    Figure 7-18

    image from book
    Figure 7-19

  3. In some cases, it may be most appropriate to show No Toolbar in the Web Part at all. The next example reviews the steps for changing the toolbar display option on a Web Part.

  4. Click the OK button to close the tool pane. Notice your Web Part now has a toolbar exposing some key functionality allowing you to interact even further with your list data.

image from book

Business Data Web Parts

Although SharePoint is an excellent data repository, a typical company keeps much of its operational and historical data in other systems such as SAP, PeopleSoft, Oracle, and custom line-of-business (LOB) applications. These are usually called back-end systems, and they often run on mainframe or midrange computers and have been in place for many years. Because it may be impractical to reengineer them to use SharePoint for data storage but there is still a need to extract their data for reports, KPIs, and other SharePoint collaboration features, SharePoint’s offers the Business Data Catalog (BDC). BDC lets you access data from these other data sources via specialized Web Parts, lists, and libraries.

The Business Data Web Parts are a group of powerful Web Parts that allow you connect to and interact with important business data from various sources ranging from Excel workbooks data sources connected through the BDC. The Business Data Web Parts consist of the following Web Parts:

Open table as spreadsheet

Web Part

Description

Business Data Actions

Displays a list of actions from the BDC that allow you to view or interact with business data. For example, you may be able to email a customer by selecting an action from a Web Part displaying information about the customer.

Business Data Item

Displays information related to a single item from a data source in the BDC. For example, you may be able to view details of a customer’s invoice in a Web Part.

Business Data Item Builder

Used only on business data profile pages, this Web Part creates a business data item from parameters on the query string and then provides it to other Web Parts.

Business Data List

Displays a list of items from a data source in the BDC. An example of this might be a listing of customers.

Business Data Related List

Displays a list of items as they pertain to child parent relationships from a data source in the BDC. An example of this is a listing of orders made by a single customer that had been selected in a Business Data List Web Part.

Excel Web Access

Allows you to interact with an Excel workbook as a web page. This is helpful for displaying financial or numerical reports based on information stored in a spreadsheet by displaying it directly in a Web Part.

iView

A special Business Data Web Part used to display iViews from SAP portals.

WSRP Consumer

A special Business Data Web Part used to display portals from websites using WSRP 1.1.

Tip 

Each of the business data Web Parts (excluding the iView and WSRP consumer Web Parts) is covered in detail in Chapters 12 and 13.

Content Rollup Web Parts

Content rollup Web Parts allow you to gather information from multiple subsites within a site collection and then create a “rolled-up” view of that information in a single location. Commonly a user might place these Web Parts on a personal site, such as My Site. On a My Site, users can track tasks assigned to them from all sites in the site collection. Content rollup Web Parts are also particularly helpful when you have multiple divisions or teams in your business. Rollups allow each division to have a presence on the corporate intranet, while allowing users to roll up information so that they can view only the divisions that they need. The content rollup Web Parts include the following:

Open table as spreadsheet

Web Part

Description

Colleague Tracker

Displays a list of your colleagues and any recent changes they have made to their profile. For example, if someone you have specified as a colleague changes positions in the organization and updated his title, you would see information displayed in the Colleague Tracker Web Part.

Colleagues

Displays links to the colleagues a user has shared with you. By clicking a link, you are redirected to the personal site of that user.

Get Started with My Site

This Web Part displays tips and tricks to get a user familiar with using a My Site. This Web Part is an administrative Web Part that is part of each My Site when it is created.

In Common Between Us

When viewing another user’s My Site, this Web Part displays things in common between you and the site owner based on information in your user profiles. For example, if you view the site of a user who attended the same university as you, you see this highlighted in the Web Part.

Memberships

This Web Part displays your site and distribution list memberships.

My Links

Displays a list of your links that you have added to the My Links list on your My Site.

My Pictures

Displays pictures from your picture library with an option to view them as a slide show.

My Workspaces

Displays a list of subsites created under your My Site.

Recent Blog Posts

Displays the recent user blog posts.

SharePoint Documents

Displays documents authored by the user where the user is a site member.

Site Aggregator

Also called My SharePoint Sites on your My Site, you can add this Web Part to any site to display a combined view of documents and tasks that are related to the current user across a number of sites. A user can add sites by creating tabs in the Web Part for each of the sites they frequent often (see the next Try It Out).

Try It Out-Using the Site Aggregator Web Part

image from book

As you begin creating your team sites, you need a way to help organize these sites. The Site Aggregator Web Part puts the sites you frequently use at your fingertips so that accessing documents you create and assigned tasks is a breeze. The Site Aggregator Web Part collects documents and tasks from sites that you specify in the Web Part by entering a URL or creating a tab. In this Try It Out, you add the Site Aggregator Web Part to a page and create a new tab in the Web Part for the Advertising Team site. This allows members of the team site to directly access documents and tasks in completely separate sites directly from the Web Part on the team site.

  1. Select Site Actions image from book Edit Page. The page appears in Edit mode.

  2. Select Add a Web Part in the zone you want to display your Web Part.

  3. In the Content Rollup Web Parts section, select the check box next to the Site Aggregator Web Part.

  4. Click the Add button. The Site Aggregator Web Part is added to the page.

  5. To add a new Site tab to the Site Aggregator, select New Site Tab. The Web Part refreshes and contains a form where you can enter the name and description of a site.

  6. Enter the URL of the advertising site you created in Chapter 5. If you do not remember that URL or did not complete the exercises, enter the URL of a site that contains multiple documents that have been created by you and tasks that are assigned to you.

  7. Change the title for the tab to Advertising Documents.

  8. Click the Create button.

How It Works

When you create a new tab, you specify the URL of a SharePoint site and the site’s name is automatically populated. This means that the Web Part connects and recognizes the site. Once you save the tab, you see a listing of documents and tasks in the Web Part, as shown in Figure 7-20.

image from book
Figure 7-20

These Web Parts are stored on the advertising site but accessible via the Web Part for your convenience. This Web Part will display a personalized list of documents and tasks to each visitor to the team site. Users commonly place this on a My Site so they can add tabs for the sites they frequent so they can easily access documents and tasks in a single location. You will also likely notice that the location for some documents may be different. This is because the Web Part is displaying documents from multiple document libraries. This is an example of the rollup capabilities of the Web Part.

image from book

Dashboard Web Parts

Key performance indicators (KPI) are business metrics that organizations use to monitor their current state of growth and activity. Executives determine how well their company is doing by comparing KPIs against predetermined business goals. Because the company’s future course of action may largely depend on this comparison, executives demand reports that accurately show KPIs. SharePoint uses KPI in its Dashboard Web Parts to give you a visual indication of how well or poorly your business activities are progressing. Part of this visualization comes from the ranges that you set for icons that act as warning indicators. A green icon indicates that the KPI is on target. A yellow icon means that the KPI is at the lower end of the target, and the red icon KPI warns that the KPI is severely below target.

Dashboard Web Parts include the following:

Open table as spreadsheet

Web Part

Description

Key Performance Indicators

A list of status indicators that measure your organization’s progress toward goals.

KPI Details

A single status indicator that may derive data sources, such as SharePoint Lists, Excel Workbooks, and SQL Server 2005 Analysis Services KPIs.

Tip 

In this section, you work through a Try It Out to see how to use the Key Performance Indicator Web Part. In Chapter 11, which discusses Excel Services, you learn how to actually create a KPI list as part of a business scorecard, which is basically a list of various KPIs versus a company’s targets.

Try It Out-Using the Key Performance Indicator Web Part

image from book

To start this Try It Out, you must first create key performance indicators in a list on a team site so that you can display the data in a Web Part. Although you can create key performance indicators based on multiple data sources, in this case you create a KPI using manually entered data.

Tip 

For more on lists, see Chapters 2 and 4. For more on KPIs as they relate to Excel Services, see Chapter 11.

To get a sense of how KPIs work, you set your first quarter sales item goal as 1,000 units and specify the current indicator value as 950. You then set values for when warning icons will appear. For this example, the yellow range is between 900 and 1,000 and any items below 900 will display a red warning symbol. Next, you add the KPI Web Part to your page by configuring the Web Part to a list, in this case a sales projections list. When configuring the KPI List Web Part, you may select between the various display templates that impact the shape and format of the icons. These are Checkboxes, Flat, and Traffic Lights.

  1. Select Site Actions image from book Create from your team site.

  2. Select KPI List from the Custom Lists Column.

  3. Enter a list name. For this example, enter Sales Projections.

  4. Click the Create button.

  5. Click the drop-down arrow on the New Menu Item of the KPI list toolbar and select the Indicator Using Manually Entered Information option, as shown in Figure 7-21. You are redirected to an Indicator Creation page, as shown in Figure 7-22.

    image from book
    Figure 7-21

    image from book
    Figure 7-22

  6. Give your indicator a name and description. For this example, type Sales Q1 for the name and First Quarter Sales for the description.

  7. For indicator value, enter 950.

  8. Enter the values at which you want your green and yellow indicator icons to appear. Note that the red icon appears anytime the value is below whatever you specify for the yellow icon (in this case below 900) so you do not have to enter a value for the red icon. For this example, use the following table to enter these values:

    Open table as spreadsheet

    Value Name

    Entered Value

    Status Icon section

    Select the Better Values Are Higher option.

    Green Icon

    Type 1000.

    Yellow Icon

    Type 900.

  9. Click the OK button. Your KPI is created in the list.

  10. From the home page of your team site, select Site Actions image from book Edit Page. The page reloads in Edit mode.

  11. Select Add a Web Part in the zone you want to display the Web Part.

  12. From the Dashboard Web Parts section, select the check box next to Key Performance Indicator Web Part and then click Add.

  13. Click the Open the Tool Pane link to configure the Web Part link displayed inside the Web Part.

  14. Click the icon to the right of the Indicator List field.

  15. Select the Sales Projects list. Note: You may need to select the team site from the options on the left.

  16. For the display icon, select Traffic Lights, as shown in Figure 7-23.

    image from book
    Figure 7-23

  17. Click Apply, and then OK on the Web Part tool pane.

How It Works

Because your current value is 950, you can expect to see a yellow indicator. As long as you keep your KPI items updated over time, the visual indicators will remain accurate and executives can make informed business decisions.

image from book

Filter Web Parts

As an organization grows, inevitably so does the amount of information revolving around it, resulting in users wasting time sifting through data to find what they need. Filters ensure that the right information goes to the appropriate users. They both instantly reduce the amount of information that displays within connected Web Parts and return relevant information to end users. SharePoint offers several filters for users to access data. With the exception of the Filter Actions Web Part, all the Web Parts in the following table filter Web Part content using the method indicated. The Filter Action Web Part filters actions only.

Web Parts can be connected to one another so that one Web Part provides values to filter the display of information on the other Web Part. For example, one Web Part may contain a listing of customers, which is connected to another Web Part that displays a listing of orders. When a user selects a customer from the first Web Part, the orders list will refresh to display only orders that contain the customer’s name. Filter Web Parts expand on your options for connecting Web Parts by providing you with more options on how data can be filtered in the Web Parts.

Open table as spreadsheet

Web Part

How It Filters

Business Data Catalog Filter

Uses a list of values from the BDC.

Choice Filter

Uses a list of values that the page author enters.

Current User Filter

Identifies properties of the current users to filter information on the page.

Date Filter

Allows the user to enter or pick a date that filters information on the page.

Filter Actions

This filter Actions

Page Field Filter

Uses information about the current page to filter information in a Web Part.

Query String (URL) Filter

Uses values passed via the query string.

SharePoint List Filter

Uses a list of values from an Office SharePoint Server list.

SQL Server 2005 Analysis Services Filter

Uses SQL Server 2005 Analysis Services Cubes.

Text Filter

Allows the user to enter text values.

You can use the Current User Filter Web Part to display information from other Web Parts or data that is relevant to the current user. Upon recognizing the user, the system generates content based on a field that contains either the current user’s username (example: domain\user) or a specific user profile property such as Name or Email Address.

Try It Out-Using the Current User Filter Web Part

image from book

When you connect two Web Parts, they share information between them in order to filter content. In this particular Try It Out, you connect the Current User Filter Web Part to a standard Tasks List Web Part to filter the tasks list so that users only see items assigned to them. You start by first creating a list that displays in a List Web Part. Although this exercise uses the Tasks list, you can apply the same process to any list or library that contains a column with user profile information. For example, if your document library has a column for Reviewer that uses the Person or Group column type, then you can connect that column to a Current User Filter Web Part.

In this example, you use the Summary toolbar to add sample data to your list. In the “Change the View of a List Web Part” Try It Out, you learned that you can customize the toolbar on a Web Part by choosing either the Summary, Full, or No toolbar options. By leaving the default toolbar choice of Summary in this example, users can add content directly from the Web Part instead of visiting the list page. This toolbar is only displayed to users who have the permissions to create new content.

Once you add the Current User Filter Web Part to the page, you define what type of information it should look for in the connected Web Part. By default, the search is for the current username column, which has information in the domain\user format. However, the type of information you seek may be in a person- or group-based column. If so, you must select a profile property compatible with the format of the information in the column. In this example, you select the Name column because it is the same information that displays within the Assigned To column of your List Web Part.

  1. From your team site, select Site Actions image from book Create. You are redirected to the SharePoint content creation page.

  2. From the Tracking column, select Tasks.

  3. In the Name field, type Important Tasks.

  4. Click the Create button. Your new Tasks list is created, and you are redirected to the List page.

  5. Return to the main page of your site and select Site Actions image from book Edit Page. The main page reloads in Edit mode.

  6. Select Add a Web Part in the left Web Part zone. The Web Part Selection window appears.

  7. In the Lists and Libraries section, select the check box next to the Important Tasks Web Part, and then click the Add button. The main page reloads with the new Web Part added to the left Web Part zone.

  8. Click the Exit Edit Mode link.

  9. To ensure that you have some actual data to filter, you add a couple of sample tasks directly from the Web Part. Click the Add a New Item link from Summary toolbar. The Important Tasks: New Item window appears, as shown in Figure 7-24.

    image from book
    Figure 7-24

  10. Enter information for the new task. For this example, use the following table to enter values:

    Open table as spreadsheet

    Value Name

    Entered Value

    Title

    Type Submit Quarterly Report.

    Priority

    Select (1) High from the drop-down menu.

    Status

    Select In Progress from the drop-down menu.

    % Complete

    Type 1.

    Assigned To

    Type your name here.

    Description

    Type Please submit the quarterly report by the end of the month.

    Start Date

    Leave as the current day.

    End Date

    Select the last day of the current month.

  11. Click the OK button.

  12. Repeat the steps for at least one other task, ensuring that it’s assigned to another user. This exercise assigns Amanda Murphy with the task of updating the January sales figures. Now that you have a list and data to filter, you can add the Current User Filter Web Part to the page.

  13. Select Site Actions image from book Edit Page. The page reloads in Edit mode.

  14. Select Add a Web Part from the Right zone. The Web Part selection window appears.

  15. From the Filters Web Parts section, select the check box next to the Current User Filter Web Part and then select Add. The main page reloads with the current user filter Web Part added to the page.

    Tip 

    This Web Part is not visible on the page to users. It is used to filter data in the Tasks List Web Part.

  16. From the Current User Filter Web Part, select Edit image from book Modify Shared Web Part. The Web Part tool pane appears.

  17. In the Select Value to Provide section of the Web Part properties tool pane, select the radio button for SharePoint Profile Value for Current User, as shown in Figure 7-25.

    image from book
    Figure 7-25

  18. Select Name from the drop-down menu.

  19. Click the Apply button. The main page refreshes to contain your latest changes.

  20. Select Current User Filter Web Part Edit Menu image from book Connections image from book Send Filter Values to image from book Important Tasks. The Web Part Connection Definition window appears.

  21. In the Consumer Field Name drop-down menu, select Assigned To.

  22. Click the Finish button. Your Web Parts are now connected.

  23. Click the Exit Edit Mode link. Your Web Parts do not display only tasks for which you are listed in the Assigned To column.

How It Works

When the Web Parts are connected, the requested values are filtered based on the specified criteria. In this case, only information relevant to the current user is visible. Adding the other Filter Web Parts follows a similar process to that which is listed in the previous Try It Out; however, the type of information that will be filtered may be slightly different.

image from book

Miscellaneous Web Parts

The Miscellaneous Web Parts feature a group of Web Parts that are designed to meet a number of unique needs and can be customized to display custom information or data. Some of these Web Parts such as the Content Editor, Form, and Image Web Parts have existed in previous versions of SharePoint, but others are new or significantly enhanced, as shown in the following table:

Open table as spreadsheet

Web Part

Description

Contact Details

Displays information about a contact for the page or site.

Content Editor Web Part

Places rich text, tables, or images directly on to a page.

Form Web Part

Connects simple form controls to other Web Parts.

Image Web Part

Displays a single image.

Page Viewer Web Part

Displays linked content such as a file, folder, or web page. This content is separated from the rest of the page.

Relevant Documents

Displays documents relevant to the current user.

Site Users

Displays a list of the users of the current site and their online status.

User Tasks

Displays tasks assigned to the current user.

XML Web Part

Use this for XML and XSL Transformation.

Some examples of the new Web Parts include relevant documents and user tasks, which roll up information from multiple locations into a single Web Part. These Web Parts take advantage of personalization and content rollup in order to minimize the locations where users are required to visit to see relevant information. In the next example, you use the Relevant Documents Web Part to demonstrate some of its rollup and customization capabilities.

Try It Out-Using the Relevant Documents Web Part

image from book

In this Try It Out, you add the Relevant Documents Web Part to the main page of a team site. As team members visit your site, they will see a listing of documents relevant to them across all existing document libraries. A site manager has three display options for this Web Part: The site can display documents that the user last modified, that the user created, or that the user currently has checked out. Although a custom view of a library would accomplish the same thing, the Relevant Documents Web Part can display documents on the site regardless of their location. The Data category has an option that allows you to display a hyperlinked location to where the document is actually stored.

A good use of this Web Part is to place it in the right-hand corner of a fairly active team site with the title “Items Checked Out to Me.” When documents are buried in folders and spread across multiple libraries, users may not know they still have documents checked out, and showing a quick list of checked out items is beneficial. This saves the user the significant time it would take to navigate down through multiple levels to find their working documents.

  1. Select Site Actions image from book Edit Page. The page appears in Edit mode.

  2. Select Add a Web Part and then select Relevant Documents from the Miscellaneous group.

  3. Click the Add button. The main page reloads with your Web Part added to the page in the desired zone.

  4. Select the Edit button on the Web Part title bar and select the Modify Shared Web Part from the drop-down menu that appears. The Web Part tool pane opens.

  5. Expand the Data category at the very bottom of Web Part tool pane.

  6. Select the check boxes for Include Documents Created By Me and Include Documents Checked Out To Me, as shown in Figure 7-26.

    image from book
    Figure 7-26

  7. Change the maximum number of items shown to 15 so that up to 15 items will be display in the Web Part.

  8. Click Apply, and then OK save the Web Part tool pane changes. The Web Part reloads to display up to 15 items that have been created by you or are checked out to you.

image from book

Outlook Web Access Web Parts

With more and more organizations taking advantage of the rich email capabilities of Exchange Server 2003 and 2007’s Outlook Web Access, it’s no surprise that SharePoint offers Outlook Web Access Web Parts. The various Web Parts are: Calendar, Contacts, Inbox, Mail Folder, and Tasks list. These Web Parts allow you to see what’s going on in Outlook without exiting SharePoint.

Tip 

Note that these Web Parts only work if you’re using Outlook Web Access or Exchange Server 2003 or later.

In the next Try It Out, you learn how to add two of these Outlook Web Access Web Parts to a personal site to view your Outlook Calendar and Tasks. By default, the My Calendar Web Part should already exist on your personal site. However, if for some reason it has been removed, you need to add it back to complete this exercise using the method described in the previous Try It Out for adding a Web Part to a page.

The following Try It Outs focus on the Calendar and Task Web Parts; however, the same processes can be used to add the other Outlook Web Access Web Parts to a page. The only difference will be the view of information that is displayed.

Try It Out-View Outlook Calendar and Tasks from Your Personal Site

image from book

Once SharePoint is rolled out to users, it usually becomes the application that is always open either in the browser or dashboard so that they can perform their work. Naturally, then, users need an area where they can track their personal email, appointments, or tasks. The Outlook Web Access Web Parts give them this capability, and they can easily configure it by simply defining the mail server address (if not already populated), the mailbox name (if not already populated), and a preferred view (if applicable).

In this example, you add the Exchange Calendar and Tasks List Web Parts to a user’s personal SharePoint site so that any items that these parts can access become available each time they visit it. The My Site can be customized based on the user’s wishes. The Calendar Web Part can display either a monthly view, weekly view, or daily view. The Tasks Web Part can sort things either by their due date or strictly by subject. Users also commonly display their inbox so that they can access email directly from their My Site. This is particularly helpful for mobile or remote workers who log into the SharePoint interface to access information in a web-based environment. Having their email messages embedded within their site provides instant accessibility and ease of use.

  1. Click the My Site link from anywhere within your SharePoint environment. By default, in the top right-hand corner the My Calendar Web Part should appear, as shown in Figure 7-27.

    image from book
    Figure 7-27

  2. Click the Open the Tool Pane link from within the Web Part. The Web Part tool pane appears.

  3. Enter the web address for your Exchange 2003 or 2007 mail server. If you are unsure of the address, see your mail server administrator.

  4. The value of your mailbox should be already specified. If not, enter your email address.

  5. Click the Apply, and then OK. The page reloads containing your configured Web Part.

  6. Select Site Actions image from book Edit Page. The page is displayed in Edit mode.

  7. Select Add a Web Part from the Middle Right Zone. The Web Part Select window appears.

  8. From the Outlook Web Access group, select My Tasks.

  9. Click the Add button.

  10. Click the Open the Tool Pane link from within the Web Part.

  11. Specify the web address for your Exchange 2003 or 2007 mail server.

  12. Select By Due Date for the view.

  13. Click Apply, and then OK. Your Web Parts are displayed on your My Site containing information directly from Outlook Web Access.

image from book

Search Web Parts

While SharePoint easily channels important information to relevant audiences, you still may have to search for information. To make searching for information as easy as possible, SharePoint 2007 has made significant improvements to the Search capabilities, not the least of which includes Search Web Parts.

Tip 

The Search feature and related Web Parts are reviewed in detail in Chapter 14, which is dedicated to the topic of search and search interface customization. In this chapter, you configure some of the following Web Parts to create a customizable search interface. While some of the display properties of the Web Parts may be slightly different, many common features exist between them from a configuration standpoint.

The Search Web Parts include those in the following table:

Open table as spreadsheet

Web Part

Description

Advanced Search Box

For parameterized searches based on properties and combinations of words.

People Search Box

Used to search people.

People Search Core Results

Displays the people search results and the properties associated with them.

Search Actions Links

Displays the search action links.

Search Best Bets

Displays the special term and high confidence results.

Search Box

Searches documents and items.

Search Core Results

Displays the search results and the properties associated with them.

Search High Confidence Results

Displays keywords, best bets, and high confidence results.

Search Paging

Displays links used to navigate pages containing search results.

Search Statistics

Displays the search statistics, such as the number of results shown on the current page, total number of results, and the time it took to search.

Search Summary

Displays the “Did You Mean” portion of the search terms.

Site Directory Web Parts

As a SharePoint environment grows and expands, so do the number of sites and site collections. To prevent users from getting lost in their own environment, SharePoint has a special site template for a site directory where you can categorize your sites in an intuitive fashion. Multiple categories, hierarchy rollups, and a centralized sites list allow users to avoid browsing through an entire navigation tree to find what they need. The following table shows the Site Directory Web Parts:

Open table as spreadsheet

Web Part

Description

Categories

Displays a list of categories from the Site Directory.

Sites in Category

Displays a list of sites in the Site Directory.

Top Sites

Displays a list of the top sites in the Site Directory.

In the next Try It Out, instead of adding one of these Web Parts to another site, you modify the categories Web Part directly from the Site Directory. As explained in Chapter 8, the Site Directory is a site that can be created on its own or is part of the Collaboration Portal template. This demonstrates how you can further customize and extend existing embedded Web Parts.

Try It Out-Modify the Settings of a Site Directory Web Part

image from book

The Site Directory offers several tabbed pages, with each page containing a Web Part that you can further customize or extend. If desired, a site manager can add new Web Parts to these pages or create additional tabs. In this Try It Out, you modify an existing Categories Web Part in the Site Directory to change some of the presentation features. You use some of the pre-built styles available in SharePoint 2007.

  1. Go to the top-level site of Corporate Intranet site based on the Collaboration Portal template.

  2. Select Sites from the top navigation to visit the Site Directory of that portal.

  3. Select Site Actions image from book Edit Page. The page reloads in Edit mode.

  4. From the Categories Web Part, select Edit image from book Modify Shared Web Part. The Web Part tool pane appears.

  5. Expand the Presentation group. The Web Part tool pane is displayed.

  6. Enter or change the options to suit your needs. For this example, use the following table to change options or fields:

    Open table as spreadsheet

    Value Name

    Entered Value

    Header Text

    Type Browse Our Sites by Category.

    Header Style

    Change to Centered.

    Number of display columns

    Change from 2 to 3.

    Level 1 Style

    Select Vertical with Boxed Title.

    Level 2 Style

    Select Vertical with Small Title.

    Level 3 Style

    Leave as Vertical.

  7. Click Apply and OK to preview your changes, which should resemble Figure 7-28.

    image from book
    Figure 7-28

image from book

Default Web Parts

Each site you create has default Web Parts that serve various functions, such as content rollup, information display, or navigation. Some of these Web Parts are key elements for making SharePoint pages useful and intuitive to users. The following table shows the default Web Parts and their purpose:

Open table as spreadsheet

Web Part

Description

Content Query

Displays content located throughout the site collection based on criteria a user specifies in a customizable query.

I need to

Launches tasks for users based on common activities they might complete from the portal or other web-based locations outside of SharePoint. This Web Part is tied to the top tasks property in the Sites Directory. Whenever a URL is added to the Site Directory with the Top Tasks check box selected, it appears in this Web Part.

RSS Viewer

Retrieves information from an RSS source and displays it on a web page.

Summary Link

Displays links to web pages and sites both within and outside the SharePoint environment. You can group and style these links and associate them with images or icons.

Table of Contents

Used in the Site Map tab of the Site Directory, this Web Part can be added to any page to display the site hierarchy from a fixed or dynamic location.

This Week in Pictures

Displays an image from a picture library and a link to a slide version of the library.

The Content Query Web Part, shown in the first Try It Out, is the most versatile because it rolls up content so that you can display information on a page from any location in a site collection. You can roll up content based on its List Type, Content Type, or on site column values.

Tip 

For more on lists, columns, and content types, see Chapters 2, 4, and 6.

In SharePoint, you use the Summary Links Web Part to aggregate and display information more easily than in previous versions, where content authors manually published links to a portal area (and where an author’s focus on content meant this important step was skipped). The Summary Links Web Part creates direct links to content and groups them based on a common heading.

The Content Query Web Part can be configured to display certain types of content and then automatically searches through a site collection to display links to items. This is a common form of something called content aggregation, which is the process of consolidating information in a single location from multiple locations. For example, someone on your team is probably responsible for recording and later storing meeting minutes, and everyone on the team knows where on the site these are located, but management or stakeholders wanting to keep abreast of certain projects may not know where to look. Rather than relying on the content author to publish a link to the minutes for each meeting, the portal administrator can add a Content Query Web Part to search for all meeting minutes throughout the site collection. In the next exercise, you walk through how that process can be done by adding a Content Query Web Part to a management site, which pulls documents from all over the site collection that uses a unique content type.

Besides allowing aggregators to view content from an RSS feed, SharePoint has a Web Part that displays RSS-enabled content directly from SharePoint. In the second Try It Out, you add an RSS Viewer Web Part to the main page of your corporate portal to display news and updates from outside the company.

Try It Out-Using the Content Query Web Part

image from book

In this Try It Out, you see that no matter where you add a Web Part, it can pull information from any location in the site collection. You can run a query on the entire site collection, or limit it to specific subsites or lists and filter based on list types, metadata properties, or content types. To filter using metadata properties, the property should be a site column accessible from where you have the Web Part. For example, if you have a column at the top-level site of your site collection (http://servername), it can filter a Content Query Web Part on or below that site. If you have the column on a subsite further down in the site collection (http://servername/divisions/marketing/branding), that column would only be available for filtering on that site and subsites.

In this Try It Out, you select the document’s content type that is the same as most documents you store in the site collection. You also select the option for all child content types, which means that any documents based on your selected content type display in the Web Part. Because you can potentially retrieve every single document in the organization, you limit the query, in this case a maximum of 25 items. By default, the sort order is based on when the documents were created and sorted in descending order. This means that for this Try It Out, you see the last 25 documents created in the site collection.

You have various options for displaying content in the Web Part, including how to style the group name and item details. In addition, you can specify how many columns appear in the Web Part. If you anticipate a large amount of data or several groups, presenting the information in multiple columns makes it easier for the end user to read. For the group heading, you use a dynamic property of <site>, which shows each item grouped by the site on which it resides. This is particularly helpful in situations where a company may have team meetings displayed in a single Web Part. By grouping items by the site, meeting minutes display under the site name, which clearly differentiates each team.

The last thing you do in this Try It Out is enable an RSS feed on the Web Part. Thus, users who subscribe to the query can view new items in their RSS aggregator as they appear in the Web Part. For example, because Microsoft Outlook 2007 supports the content aggregated from an RSS feed, users can subscribe to this Web Part and, as new items appear in the Web Part, they also appear in the user’s Outlook folder.

  1. From the home page of a Corporate Intranet site collection based on the Collaboration Portal template, select Site Actions image from book Create Site. The site creation page appears.

  2. Create the site using the following settings:

    Open table as spreadsheet

    Item

    Value

    Title

    Management

    Description

    Management Portal Site

    URL Name

    Mgmt

    Template

    Publishing Site (from the Publishing tab)

    Permissions

    Use unique permissions

    Use top link bar of parent site

    Yes

  3. Click the Create button. A new site is created, and it acts as the parent site of all divisional pages.

  4. Create a Management portal site to serve as a location where managers can work together and aggregate content. Select Site Actions image from book Create Site. The Site Creation window appears.

  5. Create the site using the following settings:

    Open table as spreadsheet

    Item

    Value

    Title

    Divisions

    Description

    Corporate Divisional Portal Sites

    URL Name

    Divisions

    Template

    Publishing Site (from the Publishing tab)

    Permissions

    Use same permissions as parent site

    Use top link bar of parent site

    Yes

  6. Click the Create button.

  7. Click the OK button to accept the site groups that are automatically created for the new site.

  8. Add a Web Part that aggregates content from the site collection and displays it at the top level of the site collection. From the top level of the site collection, select Edit Page.

  9. From the left column Web Part zone, select Add a Web Part.

  10. From the Default group, select the Content Query Web Part and click the Add button. The Content Query Web Part appears on the page in the left column Web Part zone.

  11. Select Modify Shared Web Part from the Edit menu of the Web Part. The Web Part tool pane appears.

  12. Expand the Query category as shown in Figure 7-29. Notice that the default selection shows items from the entire site collection. You should keep this option selected because you want to display content that is stored anywhere in the site collection.

    image from book
    Figure 7-29

  13. For List Type, select Document Library.

  14. Select the content type that you want to display in the Web Part. In most cases, you should have a custom content type to reflect the data you want to display such as Meeting Minutes, Financial Reports, or Sales Proposals. Because the goal of this Try It Out is to demonstrate how the Web Part is configured, you select the Document Content Types group and the content type “Document” as shown in Figure 7-29.

  15. Select the Include Child Content Types check box.

  16. Expand the Presentation category.

  17. For the Grouping and Sorting settings, group the items by <site> and display them in 2 columns.

  18. Select the check box to limit the number of items displayed to 25.

  19. For Styles, use the Banded style for the group name and make the item style a bulleted title.

  20. Enable a Feed for the Web Part. For Feed Title, enter Latest Documents.

  21. Select Apply, and then OK to save your changes. The Web Part refreshes on the page, displaying items grouped by their site with an RSS icon in the bottom.

image from book

Try It Out-Use the RSS Viewer Web Part

image from book

RSS (Really Simple Syndication) is a popular method for aggregating content from various sources and displays them in a client application such as Outlook or a web application such as SharePoint. In the last Try It Out, you added a Web Part that consumes an RSS feed so users can view headlines for items newly added to a source location. You can use an RSS feed to display news headlines from a central news site within SharePoint or from a major news network site such as www.cnn.com or www.msn.com.

  1. Return to the management site created in the previous Try It Out.

  2. Select Edit Page from either the Page Editing toolbar or the Site Actions menu. The page reloads in Edit mode.

  3. Select Add a Web Part from the Right column. The Web Part Selection window appears.

  4. Select RSS Viewer from the Default group, and click the Add button. The page reloads containing the RSS Web Part.

  5. Click the Open the Tool Pane link that is displayed in the Web Part. The Web Part tool pane appears, as shown in Figure 7-30.

    image from book
    Figure 7-30

  6. Specify an RSS Feed URL.

    Tip 

    If you do not know what RSS feed to supply, try visiting any major news site or weblog. You can often find RSS feeds by looking for the words RSS or XML, or by looking for an orange icon. You can also view an RSS feed for any list or library in SharePoint as well as select Web Parts such as the Content Query Web Part that was configured in the previous Try It Out.

  7. Set the feed limit to 10.

  8. Select Apply, and then OK. Your page should refresh with an updated Web Part, as shown in Figure 7-31.

    image from book
    Figure 7-31

image from book

The Data View Web Part

The Data View Web Part can display data from a variety of sources including but not limited to SharePoint lists, databases, Web Services, or Line-of-Business (LOB) applications. You can use the Data View Web Part to transform the default XML (CAML) list data to XSL, and thus customize the look and feel of an otherwise relatively flat list data. For example, you can display your data in a decorative table, complete with vibrant colors and background images, or give your titles a more stylish font. The Data View Web Part is far from limited to simple layout or colors; in fact, its uses are far-reaching when dealing with dynamic data. You can use the Data View Web Part to connect to a database or web service, as well as write code to perform advanced calculations of information.

Tip 

Because this book is intended to demonstrate some basic uses of the Web Parts, chapters do not cover the advanced usage of this Web Part. The Data View Web Part requires that you use SharePoint Designer 2007 and as such, it’s recommended that you have a seasoned developer familiar with the software perform the work that this Web Part requires.

Try It Out-Converting from List View to Data View

image from book

As mentioned before, the Data view Web Part performs XSL transformation on the XML data, thus converting it to a more customizable template-based format. This allows you to edit the data in a what-you-see-is-what-you-get (WYSIWYG) editor. In this Try It Out, you use the WYSIWYG editing system to change the color of the row displaying the list data, which would otherwise be white.

When you save the document, you receive a warning that you are customizing the page and breaking its relationship with the site definition. It is generally a good idea to create your data views on a temporary page, export them using the method described earlier in this chapter, and then import them back into a page that is still connected to the site definition. This helps reduce the number of pages in your site collection that are not connected to the site definition.

Tip 

For more on importing and exporting a page, see the section “Web Parts Basics.”

In this Try It Out, you start by creating a basic contact list on a team site. You then add the List Web Part to the site using the process demonstrated in “Add a Web Part to a Page” Try it Out earlier in this chapter.

  1. To create a basic contact list on a team site, select Site Actions image from book View all Site Content.

  2. Select Create from the toolbar.

  3. Select Contacts from the Communications column.

  4. In the name field, enter Important Contacts and then click Create.

  5. To add the List Web Part to a new Web Part page, select Site Actions image from book Create.

  6. Select Web Part Page from the Web Pages group.

  7. Name the page ContactDetails.aspx, select the Full Page, Vertical layout template, and select that you want to save the page in your Shared Documents library.

  8. Click the Add a Web Part button from the Full Page Web Part zone.

  9. Under Lists and Libraries, select the check box next to Important Contacts and then click Add. Notice that your list is added to the page.

  10. Create three new contact items in your list by adding contact information for three of your team members. The process for adding content to a list was described in Chapter 2.

  11. To convert the basic List Web Part to a Data view, you need to connect to the site using SharePoint Designer 2007. Open the SharePoint Designer application.

  12. Select File image from book Open Site and type the URL of your site.

  13. Open the page containing your List Web Part and switch to Design view.

  14. Select the List Web Part by clicking on it once.

  15. Right-click and select Convert to XSLT Data View.

  16. Select the entire second row (to select, click in an end column and drag your mouse along the entire row) to display your data as shown in Figure 7-32.

    image from book
    Figure 7-32

  17. Right-click and select Cell Properties.

  18. Click Background Color and change it to Blue.

  19. Click Apply, and then OK to set your changes.

  20. Save your document. When prompted with a warning that you are about to customize the page, click OK. When you are redirected back to your page, notice the data column has changed to blue. Adding a new item to the list yields another row of data with the same look.

image from book




Beginning SharePoint 2007. Building Team Solutions with MOSS 2007
Beginning SharePoint 2007: Building Team Solutions with MOSS 2007 (Programmer to Programmer)
ISBN: 0470124490
EAN: 2147483647
Year: 2007
Pages: 131

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