Creating a Corporate Web Part Gallery for SharePoint Portal Server 2001

Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Published: June 1, 2001

On This Page

Introduction
Working with Catalogs
Setup Overview
Step 1: Create and Collect
Step 2: Choose a Catalog Server
Step 3: Populating the Catalog and Making It Available
More Information

Introduction

After building or collecting a set of Web Parts for your company, it is time to make them available to end users for use in a Microsoft® SharePoint™ Portal Server, Microsoft SQL Server™ 2000, or Microsoft Exchange 2000 digital dashboard. This is achieved by setting up a corporate Web Part Catalog. This paper explains how to set up a gallery using SharePoint Portal Server or the SQL Server Dashboard included in the Digital Dashboard Resource Kit (DDRK) 3.0.

Cc722902.crtwpg01(en-us,TechNet.10).gif

Figure 1: In addition to the Microsoft Web Part Gallery Link, an internal catalog link can be made available

Working with Catalogs

Here are some definitions that will be used throughout this document:

Web Part Catalog – a library of Web Part definition (.dwp) files that you can import into an existing dashboard.

Dashboard Server – a Web server running the digital dashboard engine. For purposes of this article, this is either SharePoint Portal Server or the SQL Server Dashboard.

Local Web Part Catalog – a Web Part catalog that is run on a server that is being used as a Dashboard Server. The SQL Server Dashboard includes a local catalog as part of its default installation. A local catalog must be setup on SharePoint Portal Server.

Web Part Catalog Server – a Dashboard Server that is dedicated to the task of hosting a Web Part catalog. A company will typically setup a Web Part Catalog server to be a central distribution point of Web Parts for multiple digital dashboard servers.

Whether you setup a local Web Part Catalog or a dedicated Catalog Server, the procedure is the same as outlined in the instructions below.

In addition to setting up your own, there are two online Web Parts catalogs available that can be used to populate your corporate catalog.

Microsoft Web Part Gallery is a public catalog available on the Microsoft Web site and contains a variety of Web Parts authored by Microsoft. You can access the Web Part Gallery only from the Contents page of a digital dashboard, by clicking the Web Part Gallery link. Both SharePoint Portal Server and the SQL Server Digital Dashboard link to this catalog in the contents page by default.

There is a large, download-only catalog located at https://www.microsoft.com/business/default.mspx that includes Web Parts from Microsoft and links to Web Parts created by 3rd parties. The Microsoft Web Parts in this online gallery are in self-extracting compressed format and must be downloaded, uncompressed and imported into your local catalog, catalog server or directly into your digital dashboard. Visit this catalog for the latest list of available Web Parts.

Setup Overview

To set up a custom catalog the following steps must be done:

  1. Create or collect the Web Part files.

  2. Chose a catalog server.

  3. Populate the catalog with the Web Parts and make it available to users.

Step 1: Create and Collect

The first step is to assemble a collection of Web Parts for your catalog. This is achieved by two methods:

  1. Creating – build a set of Web Parts. Refer to the Digital Dashboard Resource Kit 3.0 for tools and instructions on creating Web Parts.

  2. Collecting – there are hundreds of available Web Parts to avoid having to create them from scratch. Visit the Microsoft Online Gallery at https://www.microsoft.com/business/default.mspx to download available Web Parts for your corporate catalog. Before creating a new Web Part, check this Gallery to see if a similar Web Part already exists.

    A Web Part can have multiple files associated with it. There is an Extensible Markup Language (XML) document that has an extension of .DWP (Dashboard Web Part) and associated resources (XSLs, GIFs, style sheets, and so on) if they exist. When collecting Web Parts, make sure you have all the associated resource files. The resources are usually kept in a subdirectory with a title of webpartname_files. Inside of the Web Part you should see the elements <resource></resource> and a reference to these files. When a Web Part is imported, the resource files will be imported and put in the proper location automatically. If the <resource> elements exist in the Web Part, make sure the corresponding files are in the proper location.

Step 2: Choose a Catalog Server

You can designate a SharePoint Portal Server computer or a computer with the SQL Server dashboard installed to act as a catalog server. A computer with the SQL Server dashboard installed includes a local catalog by default. You must create a local catalog for SharePoint Portal Server.

SharePoint Portal Server – Very quick and easy to set up a catalog server, but it does not offer categorization of Web Parts. Figure 2 shows a catalog setup on a SharePoint Portal Server computer.

Cc722902.crtwpg02(en-us,TechNet.10).gif

Figure 2: A Web Part catalog running on SharePoint Portal Server 2001

SQL Server Digital Dashboard – Offers categorization of Web Parts. This allows you to group them in meaningful categories such as accounting, personal, Internet, etc. Figure 3 shows a categorized catalog view of a catalog running on a SQL Server dashboard.

Cc722902.crtwpg03(en-us,TechNet.10).gif

Figure 3: A categorized catalog on a computer with SQL Server dashboard installed being accessed from a SharePoint Portal Server computer

You can mix and match catalog servers with dashboard servers. This means that you can use a catalog server (using the SQL Server dashboard) with your SharePoint Portal Server and visa versa. Determining which to use is based on your needs. If you are setting up a computer running SharePoint Portal Server for a small group of users and want to quickly give them a custom catalog, it is easiest to create a local catalog on the same server. If you are setting up a single, large catalog server with hundreds of Web Parts that will service thousands of dashboards and users, you may want to consider setting up a catalog on a computer with SQL Server dashboard installed because

Step 3: Populating the Catalog and Making It Available

Modifying Catalogs on a Computer Running SQL Server Digital Dashboard

You can add, modify, or delete the list of Web Parts that appear in the local catalog or a custom catalog of a computer with the SQL Server dashboard installed by editing the Wplist.xml file that resides in the Web folder containing the Web Parts.

The Wplist.xml file determines which Web Parts are present in the catalog. It also defines the categories that group Web Parts together. You can edit Wplist.xml to add new categories or to modify the list of Web Parts that appear in a catalog.

To create a new category, define a new <Category> element for it. To add or delete a Web Part, create or delete a <Webpart> element.

About <Category> Elements

A <Category> element defines a specific category that you subsequently use to group Web Parts. It is also a container for the following elements:

  • <ID> is the identifier of a category.

  • <Description> is a longer string for the category. The value of this element is visible in a dashboard Contents page.

The following example shows the <Category> element for Administration Web Parts:

<Category>
<ID>Administration</ID>
<Description>Dashboard Administration</Description>
</Category>

About <Webpart> Elements

A <Webpart> element defines all the Web Parts contained in a catalog. It is also a container for the following elements.

  • <Title> defines the Web Part title. The value of this element is visible in the Web Part Catalog page that appears when the user opens a catalog page.

  • <Description> defines a long text string that contains information about the Web Part. The value of this element is visible in the Web Part Catalog page.

  • <Filename> defines the Web Part definition (.dwp) of the Web Part.

  • <CategoryID> defines the category in which the Web Part appears. The value of this element must be one of the values defined in the <Category> element.

The following example shows the <Webpart> element for the Dashboard View Web Part in the Administration dashboard.

<Webpart>
<Title>Dashboard View</Title>
<Description>The Dashboard Folder View Web Part is used on an administration dashboard 
to display the hierarchy of dashboards and folders. An administrator can remove 
dashboards or create new ones.</Description>
<Filename>Dashboard%20View.dwp</Filename>
<CategoryID>Administration</CategoryID>
</Webpart>

Editing Wplist.xml

Use the following steps as guidelines for editing Wplist.xml:

  1. In the Parts folder, right-click Wplist.xml, and then copy the file to a desktop location.

  2. Use a text editor to edit the file. You can edit the file by adding, modifying, or removing <Category> and <Webpart> elements, and then saving the file at the desktop location.

  3. Copy the file back to the Parts folder. You can also use a drag-and-drop operation between Microsoft Internet Explorer and Microsoft Windows® Explorer

Making the Catalog Available to Users

The Local and Web Part Gallery catalogs that appear by default in Contents pages of a dashboard are rendered based on XML definitions. In addition to these predefined catalogs, you can add custom catalogs that organize Web Parts in different categories, or link to third-party catalogs.

Catalog on a Computer with the SQL Server Digital Dashboard Installed

To add a new catalog, start by creating a new Web folder in the DAVCatalog root folder. Use this folder to store the Web Parts you want in the new catalog (similar to the Parts folder), and then update Catalogs.xml to point to the new catalog. The catalog entries are listed in the order in which they appear in the Contents page.

To delete a catalog, remove the definition from Catalogs.xml

To modify the contents of the local catalog of a computer with the SQL Server dashboard installed, edit the Wplist.xml file (see previous section).

About <WebPartCatalog> Elements

<WebPartCatalog> element defines a specific catalog. It is a container for the following elements:

  • <CatalogName> element defines the catalog title. The value of this element is visible in the Contents page. To create a new catalog, type a new catalog name.

  • <href> defines the source of catalog contents. The source can be Partcatalog.asp or another implementation that you provide. If you are creating a new catalog, pass in the name of the Web folder to Partcatalog.asp.

  • <Description> defines descriptive text. The value of this element is not exposed by default.

The following example shows how the Local Catalog is defined in Catalogs.xml through the <WebPartCatalog> element.

<DDF:WebPartCatalog>
<DDF:CatalogName>Local Catalog</DDF:CatalogName>
<DDF:href>partcatalog.asp?FolderID=_stPortalServer_/_stPortalVRoot_/Parts/</DDF:href>
<DDF:Description>Parts available in the Local Catalog.</DDF:Description>
</DDF:WebPartCatalog>

Editing Catalogs.xml

Catalogs.xml is a dashboard factory file that determines which catalogs are present in the Contents page. You can use any XML editor to modify this file.

Use the following steps as guidelines for editing Wplist.xml:

  1. Open Catalogs.xml. By default, this file is located at C:\Program Files\SQL Server Digital Dashboard\Factory.

  2. Edit the file by adding, modifying, or removing <WebPartCatalog> elements, and then save the file.

Setting Up a Local Catalog on a Computer Running SharePoint Portal Server

SharePoint Portal Server also supports catalog modifications. You can add Web Parts to a catalog on a computer running SharePoint Portal Server using the following steps:

  1. Create a personal dashboard to provide the equivalent of a catalog, and then import Web Parts you have collected or built. Note the URL of the new dashboard. For example, a personal dashboard named 'gallery' has the following URL: https://<yourSharePoint Server>/workspace/dashboards/gallery

  2. Open the Catalogs.xml file. By default, Catalogs.xml resides in the \Portal\Resources folder or in a workspace. You must be coordinator of the workspace and enable viewing of hidden files and folders to see the portal folder.

  3. Add a URL to the dashboard to the Catalogs.xml file, adding the cmd=catalog parameter to the URL (for example, https://<yourSharePointServer>/workspace/dashboards/gallery?cmd=catalog). With the ?cmd=catalog at the end of the URL, it will render a catalog view instead of a dashboard view.

The following example shows an entry in Catalogs.xml of a SharePoint Portal Server computer that points to a catalog server that uses the SQL Server dashboard.

<?xml version="1.0" ?> 
<DDF:CatalogInformation xmlns:DDF="urn:schemas-microsoft-com:dashboardfactory:">
<DDF:WebPartCatalog>
<DDF:CatalogName _locID="L_WebPartGallery_Text">My Company's Internal 
Catalog</DDF:CatalogName>
<DDF:href _locID="L_CatalogHREF_Text">https://webparts/dashboard/partcatalog.asp?
FolderID=https://webparts/DAVCatalog/Parts/</DDF:href> 
<DDF:Description _locID="L_GalleryDesc_Text">A collection of sample parts for use 
with Microsoft's Digital Dashboard</DDF:Description> 
</DDF:WebPartCatalog>
</DDF:CatalogInformation>

More Information

For additional information, see the "Working with Catalogs" section of the Digital Dashboard Resource Kit Help file (.chm) included in the DDRK 3.0 Web Parts Development Kit.