Chapter 4: SharePoint Content Development


Although the default installation of SharePoint Portal Server (SPS) looks attractive right out of the box, you will undoubtedly want to customize the appearance and behavior of the portal to match your organization. SPS supports this type of customization directly in the portal as well as through external products like Microsoft FrontPage. Additionally, individual users can personalize the portal to support their own needs. In this chapter, I will cover the various customization and personalization techniques that will help you integrate the portal into your organization.

Customizing Portal Content

As I have said before, one of the major objectives of SPS is to improve the productivity of the knowledge worker. With this in mind, SPS provides a number of ways to customize the portal and target content at groups of knowledge workers. These mechanisms include the ability to create targeted team sites, but also the ability to modify pages, use custom templates, and define groups that receive specific content.

Site Membership

One of the first ways in which you can target content to portal users is through the structure of the portal sites. In the previous chapter, you created several sites for use by various teams in the organization. After creating these team sites, you can then grant access to them so that only team members can use them. Applying these restrictions effectively targets the site content to a particular group of portal users.

Top-level sites that are created directly from the portal initially have no members, and no one is allowed access to them. Modifying access rights to a site can only be done by a member of the Administrator site group for that site. Access rights can subsequently be granted by clicking the Site Settings link at the top of the site home page.

On the Site Settings page, selecting Administration Manage Users opens the Manage Users page for the particular site. Typically, the first thing to do is grant administration rights to someone who will be responsible for the overall site and its content. After naming the administrator, you can add team members to the site. Typically, these team members will be added to the Contributor site group. Once the initial set of permissions is established, administration of a site should be turned over to the designated administrator. This person, in turn , can control the access rights for team members.

Once the new site administrator takes responsibility for the site, the next thing to do is ensure that all requests for access to the site are properly directed. This is done by selecting Administration Go to Site Administration from the Site Settings page. This opens the Top-Level Site Administration page. On this page, the administrator should select Users and Permissions Manage Access Requests. On the page that opens, the new administrator can direct access requests to his or her own mailbox. Figure 4-1 shows the Manage Request Access page.

click to expand
Figure 4-1: Directing access requests

Throughout the portal, whenever a user attempts to access a restricted feature, SPS responds with an access request page. This page allows the user to send an access request by e-mail to the administrator of a site or area. Figure 4-2 shows a typical access request page in the portal.

click to expand
Figure 4-2: Requesting access to a resource

Once the access request is made, the administrator for the resource receives an e-mail containing links to approve or reject the access request. Clicking one of the links takes the administrator directly to the appropriate page in the portal. From the portal, access can be granted and an e-mail response generated. Figure 4-3 shows a typical e-mail request received by an administrator.

click to expand
Figure 4-3: Receiving a request

Sites in SPS can be created at the top level or as subsites underneath any existing site. When subsites are created, they inherit the permissions of the parent site above them. Although this system of hierarchical site groups is appropriate for most uses, SPS will allow a site to be separated from the hierarchy and have its own unique set of permissions. Unique permissions are useful whenever you need to completely change the permission set of a site.

To set up unique permissions, you need to follow these steps:

  1. Log in to the portal as a member of the Administrator site group.

  2. From the portal home page, click the Sites link to open the Site Directory.

  3. From the Site Directory, navigate to a top-level site you created earlier.

  4. On the home page of the site, click Create.

  5. On the Create page, click Sites and Workspaces.

  6. Name the new site and give it a description.

  7. Select Use Unique Permissions.

  8. Click Create.

  9. On the Template Selection page, select the Team Site template.

  10. Click OK.

  11. When the site home page appears, click Site Settings.

  12. On the Site Settings page, select Administration Manage Users.

Along with changing the access permissions, you can also determine whether or not to allow anonymous access to a site. Anonymous access allows anyone who is a registered domain user to access the site even without specific permission. You can change this setting for each site you create.

Here is what to do to allow anonymous access:

  1. Log in to the portal as a member of the Administrator site group.

  2. From the portal home page, click Sites.

  3. Navigate to an existing site you created earlier.

  4. From the Site home page click Site Settings.

  5. On the Site Settings page, select Administration Go to Site Administration.

  6. On the Top-Level Site Administration page, select Users and Permissions Manage Anonymous Access.

  7. On the Change Anonymous Access Settings page, adjust the settings as desired. Figure 4-4 shows the Change Anonymous Access Settings page.

    click to expand
    Figure 4-4: Allowing anonymous access

  8. Click OK.

In addition to all of the site-level permissions, SPS also allows you to control access at the list level. This means that you can give access to a site while restricting access to a particular list on the site. From any list on a page, you can select Modify Settings and Columns to reach the customization page for a list. On this page, click "Change permissions for this list" to restrict access.

Audiences

Portal users can be classified in many different ways to identify groups that are interested in particular content. So far, you have used site groups and access rights to target content to portal users. However, SPS supports a more granular approach to content direction using audiences . Audiences allow you to group portal users by similar characteristics ”such as membership in an Active Directory group ”and then display specific content to the audience.

When SPS is first installed, a single audience is defined called All Portal Users. This audience targets content at anyone with permission to view the portal home page. Initially, the only way to view any of the targeted content is either on the portal home page, or through the My Site link. However, you can go much further by creating your own audiences.

You create audiences by specifying membership rules. These rules are associated with properties found in the Active Directory. You may specify one or many rules to determine membership. When you define membership, you may specify that all the rules must be met or that any of the rules can be met.

Once you have created an audience, it must be compiled. Compilation is done periodically to ensure that audience membership is always up to date. You can set up a compilation schedule, or force a compilation manually. Audiences do not exist until they are compiled.

To create an audience, follow these steps:

  1. Log in to the portal as a member of the Administrator site group.

  2. Click the Site Settings link.

  3. On the Site Settings page, select User Profile, Audiences, and Personal Sites Manage Audiences.

  4. On the Manage Audiences page, click Create Audience.

  5. Give the audience a name and description. Choose whether the audience candidates must satisfy all the rules you specify or any of them.

  6. Click OK.

  7. On the Add Audience Rule page, specify a rule for audience membership. Figure 4-5 shows a typical rule definition.

    click to expand
    Figure 4-5: Creating an audience rule

  8. After the new audience and rule are created, return to the Manage Audiences page.

  9. On the Manage Audiences page, click Start Compilation.

  10. After the compilation is complete, view the audience membership to verify the results.

Once an audience is created and compiled, you may target content to the group it represents. SPS allows you to target content to audiences using any of three different mechanisms. First, you may direct the content to the Links for You section of the home page. Alternately, you may direct the content to My Site in either the Links for You section or the News for You section.

When targeting content to an audience, you must typically select a link, listing, or document. You cannot target entire areas or sites. When you first add a link, listing, or document at the portal level, you can choose to target it to an audience. You can also choose to target the content after it is added to the portal by dragging the content to the Home or News area.

Here are the steps to target content:

  1. Log in to the portal as a member of the Administrator site group.

  2. From the portal home page, click Manage Portal Site from the Actions list.

  3. From the portal site map, select to show All items.

  4. Expand the site map and locate a link, listing, or document.

  5. Select Edit from the drop-down menu associated with the link, listing, or document.

  6. On the Change Settings page, click the Display tab.

  7. On the Display tab, select the audience to target.

  8. Click OK.

  9. Return to the portal site map.

  10. On the site map, drag the targeted link, listing, or document to the Home area.

  11. Log in to the portal as a member of the audience you targeted.

  12. Note the link on the home page of the portal. Figure 4-6 shows the results.


    Figure 4-6: Targeted content in the portal

In order to show the targeted content on My Site, you select Portal Site Content Manage Targeted Links on My Site from the Site Settings page. This opens a list where new items can be added. You can add existing items to the list or create new ones.

Targeting content to a specific audience is a powerful concept, but its default implementation is limited. With only three places to place the targeted material, audiences may seem to be more trouble than they're worth. However, the concept of audiences reaches its true value when it is incorporated into custom web parts that are able to display information and change behavior based on audience membership. I'll examine web part development later in the book and make extensive use of the programmable classes found in the Microsoft.SharePoint.Portal namespace.

Understanding Web Parts

SPS not only provides a solid structure to assist end users in locating information, it also provides a strong framework to assist content developers in presenting information. The SPS content framework is built on a set of customizable software components known as web parts. Web parts are visible immediately upon entering the portal. They are responsible for generating all of the lists and views that make up the portal. Without web parts, nothing would appear on a portal web page.

For end users, the web part framework is seamless. Although each page in the portal is made up of several web parts, end users experience them as a single page of content. The distinction between web parts and web pages becomes significant, however, for designers and programmers responsible for the portal content.

Modifying Web Part Pages

Members of the Web Designer, Administrator, and Content Manager site groups have the right to add and customize shared pages within the portal. Users with this right can customize a web page by selecting Edit Page from the Actions list. Selecting to edit the page causes a drop-down to appear on the page entitled Modify Shared Page. Selecting Modify Shared Page Design This Page causes the page to enter web-part mode. In this mode web parts can be added or removed and their behavior can be altered . Figure 4-7 shows a typical portal page in web-part mode.

click to expand
Figure 4-7: Entering web-part mode

Shared pages in the portal represent the content seen by all portal users. However, all site groups except Reader can modify their own Personal View for most pages. Modifying the Personal View of a page affects the way the content is displayed to the user who modified the page but does not affect the rest of the portal users. Before modifying a page, you should clearly understand whether your changes will be globally applied to the Shared View or just your Personal View.

Once the Shared or Personal View is in web-part mode, you can easily remove any web part by clicking the X located in the upper-right corner of the web part. Web parts can also be added to the page by selecting Modify Shared View Add Web Parts. From this menu item, you can select to browse, search, or import web parts.

Web parts are stored in one of several galleries that you can browse or search. These galleries are listed directly on the page when you select to add web parts to a page. The available galleries include the Web Part Page Gallery, the [sitename] Gallery, the Virtual Server Gallery, and the Online Gallery. Figure 4-8 shows the galleries available for use in a page.

click to expand
Figure 4-8: Accessing web part galleries

The Web Part Page Gallery contains all of the web parts that are available specifically to the web page that is being modified. If you close web parts by clicking the X, then the web part disappears from the page and becomes available in the Web Part Page Gallery. Once it is in the gallery, it may be moved back to the page by dragging it from the gallery and onto the page.

The [sitename] Gallery is named after the site where the current page is located. If your site is named Board of Directors, then the [sitename] Gallery will be named Board of Directors Gallery. This gallery contains the bulk of the general-purpose web parts that may be used throughout the current site. Later, you will add your own custom web parts to this gallery for use in the portal.

The Virtual Server Gallery is a gallery intended for large enterprise deployments of SPS with many sites. In these cases, the Virtual Server Gallery acts as an enterprise-level repository for web parts. Using this gallery entails a special deployment model for web parts called a web-part package file that I will cover later in the book.

The Online Gallery is a special gallery of web parts created and maintained by Microsoft. Initially, you will find some news and stock web parts in this gallery. Over time, Microsoft expects to add more web parts for general use.

Regardless of where you get the web part, placing it on the page is always accomplished in the same manner. Each page is divided into several zones that can contain web parts, and the number and layout of the available zones depends upon the template used to create the current page. To move a web part onto the page, you click and drag the web part from the selected gallery into an available zone. Each zone on the page may contain more than one web part. Figure 4-9 shows a web part being dragged into a zone.

click to expand
Figure 4-9: Placing a web part in a zone

Once the web parts are placed in the desired zones, they can be modified. This is accomplished by selecting Modify Shared Web Part from the drop-down menu associated with the web part. Figure 4-10 shows how to access the properties for the web part.

click to expand
Figure 4-10: Modifying a web part

Web part properties are typically grouped together in logical categories such as Appearance or Layout. You can examine the individual properties by expanding the categories in the properties pane. Once you have the properties set, click Apply to see your changes immediately on the page.

Connecting Web Parts

Although web parts are useful for displaying information, links, and lists, so far we have only seen them acting as islands of information. The content presented by multiple web parts on a page may be related, but the web parts are unaware of the related information. The connection is only made in the mind of the end user. With connected web parts, however, you can relate multiple web parts functionally. For example, an image on a site can be connected to an image viewer. Figure 4-11 shows an example of selecting an image link as the source for an image on a site home page.


Figure 4-11: Connecting web parts

You need to follow these steps to connect web parts:

  1. Log in to the portal as a member of the Administrator site group.

  2. On the portal home page, select Edit Page from the Actions list.

  3. Now select Modify Shared Page Add Web Parts Browse.

  4. Drag the Contacts web part from the Site Gallery to the middle-left zone of the portal home page.

  5. Click View Page on the Actions list to leave web-part mode.

  6. Now click the Contacts link to open the detail page.

  7. On the Contacts page, click Import Contacts.

  8. Import the contacts from Microsoft Outlook for the personnel that you assigned as area or site administrators.

  9. On the Contacts page, click Modify Settings and Columns.

  10. On the Customize Contacts page, select Views Create a New View.

  11. On the Create View page, click Standard View.

  12. Name the new view Experts and check the box "Make this the default view."

  13. In the Columns section, uncheck every box except Last Name and First Name.

  14. Click OK.

  15. On the portal home page, select Edit Page from the Actions list.

  16. Now select Modify Shared Page Design This Page.

  17. Using the drop-down list for the Contacts web part, select Modify Shared Web Part.

  18. In the List Views pane, change the current view to Experts.

  19. Click OK.

  20. Now select Modify Shared Page Add Web Parts Browse.

  21. Drag another Contacts web part from the Site Gallery to the bottom zone of the portal home page.

  22. Using the drop-down list from the first Contacts Web Part, select Connections Provide Row To Contacts [2].

  23. When the transformer dialog appears, follow the prompts to select the fields to connect between the web parts.

  24. Click View Page from the Actions list. You should now have a master-detail contacts display on the home page of the portal.

If you spend some additional time working on the list views, you can create exactly what you want. I added an additional hyperlink field to my list so that I could name an expert for each area in the portal. Figure 4-12 shows the final view perfected to associate an expert with each area and provide contact information to the portal user.

click to expand
Figure 4-12: Creating a master-detail connection

Templates

Templates are a foundational element of SPS and allow for rapid structure and content creation. Although you are initially limited to the default templates offered by SPS, you do have some capability to create new templates within the portal. Later you will see that you can gain much more flexibility using an external editor, but for now, you will focus on creating templates within the portal environment.

Site Templates

Whenever you create a new site, SPS uses predefined templates to simplify the creation of the new elements for the site. You have already seen the list of templates in use several times. These templates allow you to create everything from a specialized team site to a blank site you can use to create content from scratch. Although SPS comes with several templates already defined, you can create your own templates and then make them available to others for use. These new templates can be created directly in the browser and saved through the SPS interface.

SPS defines a Site Collection as the top-level site and all of the sites beneath it in the hierarchy. You have already seen that permissions granted at the top of a site collection are inherited by sites lower in the collection. Using the same organizational structure, SPS maintains a Site Template Gallery for each Site Collection. A new site template can be created and added to the gallery by any member of the Administrator site group.

Site templates may be created outside of SPS using an authoring tool like Microsoft FrontPage, but the simplest way to create a template is to use an existing site within the portal framework. Creating a template from an existing site is done through the Site Settings page for the site you want to save. Generally, you will save only the structure of a site as a template; however, SPS does allow you the option of saving content along with the structure.

To create a site template, follow these steps:

  1. Log in to the portal as a member of the Administrator site group.

  2. From the portal home page, click the Sites link.

  3. From the Site Directory, click the Create Site link under the Actions list.

  4. Name the new site Softball Team and give it a description.

  5. Type in a web site address for the new site and click Create.

  6. On the Add Link to Site page, click OK.

  7. On the Template Selection page, select to base this site on the Team Site template and click OK.

  8. When the new site is created, select Modify Shared Page Add Web Parts Browse in the upper-right corner of the page.

  9. On the Web Parts pane, drag the Members web part onto the page.

  10. When you have finished modifying the site, click the Home link.

  11. From the Home page, click Site Settings.

  12. On the Site Settings page, select Administration Go to Site Administration.

  13. On the Top-Level Site Administration page, select Management and Statistics Save Site as Template.

  14. On the Save Site as Template page, name the new template Sports Team. Give it a file name and description.

  15. Note that this page would allow you to save the site content as part of the template, if you wished. Click OK to finish.

Once you have created saved templates for a site collection, you can go back and manage the templates. Accessing the set of templates for a site collection is done through the Top-Level Site Administration page. On this page select Site Collection Galleries Manage Site Template Gallery. This will show you a list of all templates for the site collection excluding the default templates. From this list, you can edit the template properties or delete the template altogether.

List Templates

Just as you can create site templates from existing sites, SPS allows you to create list templates from existing lists. A list template consists of the fields that you define for the list and any views you define. Just like site templates, you also have the option of saving the list content as part of the template.

Follow these steps to create a list template:

  1. Log in to the portal as a member of the Administrator site group.

  2. Navigate to the Softball site that you created earlier.

  3. On the site home page, click the Create link.

  4. On the Create page, select Lists Contacts to create a new list for the site.

  5. Name the new list Players and give it a description.

  6. Click Create.

  7. When the new list is displayed, select Modify Settings and Columns from the Actions list.

  8. On the Customize page, select Columns Add a New Column.

  9. Name the new column Position and give it a description.

  10. Click OK to return to the Customize page.

  11. On the Customize page, select General Settings Save List as Template.

  12. On the Save as Template page, name the template Players . Give it a file name and description.

  13. Click OK.

  14. If you now return to the Create page, you will see that the new list template is available.

Area Templates

Just like sites, areas in SPS also utilize templates to control their appearance. When you create an area within the portal, it is assigned a default template; however, you can change the assignment by selecting Change Settings from the Actions list. This link opens a tabbed page that controls most of the aspects associated with an area.

The template for an area is designated on the Page tab. On this tab, you can specify that the area inherits its template from its parent, uses a default template, or uses a custom template based on another web page. Additionally, you can specify how subareas underneath this area will appear.




Microsoft SharePoint[c] Building Office 2003 Solutions
Microsoft SharePoint[c] Building Office 2003 Solutions
ISBN: 1590593383
EAN: N/A
Year: 2006
Pages: 92

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