Customizing Web sites based on SharePoint Team Services
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: February 1, 2001
On This Page
Introduction
Shared Customization Features
Customization within the SharePoint Team Web Site User Interface
Customization within FrontPage 2002
Other Customizations
Conclusion
Introduction
SharePoint™ Team Services provides a rich environment for ad hoc team collaboration, allowing users to save documents directly to SharePoint Team Web site, discuss documents within that site or on other Web sites, and share important team or project-related information. To enable administrators to make site as effective as they can be, SharePoint Team Services was designed to be highly customizable.
These customizations range from tailoring the site layout to customizing users' rights. There are two main tools for implementing customizations: a Microsoft Windows®-based Web browser (4.0 or greater) or a SharePoint Team Services compatible web authoring tools such as Microsoft FrontPage® 2002. For the purposes of this paper, we will discuss customization using the browser and FrontPage 2002. This paper divides customizations into three basic categories:
Those that can be accomplished either using the browser and using FrontPage 2002 (Shared)
Those that are accomplished exclusively using the browser
Those that are accomplished exclusively using FrontPage 2002
The last section of the paper, "Other Customizations," describes things such as creating custom Cascading Style Sheets upon which to base sites, tailoring the Search functionality of your site, and using Active Server Pages on your site.
Shared Customization Features
There are certain customization features that the user has a choice of effecting from the browser and from FrontPage 2002. These include, but are not limited to, such customizations as:
Setting templates on document libraries
Changing list security
Creating or deleting lists and document libraries
Modifying the attributes (fields) for a document library or list
Modifying the homepage layout, such as adding or deleting lists
Creating subwebs
Basing a document library on a template
Corporations or teams often establish document design standards, ensuring some level uniformity in look and feel. Supporting this need, SharePoint Team Services offers the ability to base a document library on templates.
Using the browser |
Using FrontPage 2002 |
---|---|
1. Create a template using the appropriate Office application. |
1. Create a template using the appropriate Office application. |
Changing list security
It should be noted for list security that a user with administrative privileges may modify design access even if "only the creator" is marked.
Using the browser |
Using FrontPage 2002 |
---|---|
1. From the team site, click on the document library or list you wish to modify. |
1. Using FrontPage, open your Web. |
Creating lists, document libraries, surveys or discussions
By default, SharePoint Team Services sets up several lists (Contacts, Events, Announcements, Tasks, Links, and General Discussions) and a document library called Shared Documents. While this setup meets the fundamental needs of most teams, it is expected that teams will have unique needs for custom lists and document libraries.
Using the browser |
Using FrontPage 2002 |
---|---|
1. From the team site, click Create in the global navigation bar. |
1. Using FrontPage, open your Web. |
Modifying the attributes for a list or a document library
Just as the default SharePoint Team Web site contains a set of default templates for lists and document libraries, each of those lists and document libraries contain default attributes. You may add, modify, or delete most of the attributes in lists and document libraries.
Using the browser |
Using FrontPage 2002 |
---|---|
1. From the team site, click on the document library you wish to modify. |
1. Using FrontPage, open your Web. |
Creating subwebs
A subweb is a complete SharePoint Team Services-extended web that is a subdirectory of the root web or of another subweb. Subwebs are the SharePoint Team Services mechanism for breaking up a Web site so that different areas can be owned and maintained by different people or groups. Each subweb can have many levels of subdirectories. By using subwebs, finer security granularity is automatic because each subweb maintains separate security settings.
Using the browser |
Using FrontPage 2002 |
---|---|
1. On the site home page's navigation bar, click on Site Settings. |
1. Using FrontPage, open your Web. |
Customization within the SharePoint Team Web Site User Interface
From the SharePoint team Web site UI, the site administrator or her delegate can customize the site as mentioned above. In addition to the shared customization features mentioned above, there are several customization and configuration tasks that can only be managed from the Web UI or which users might find easier to accomplish using the Web UI. These include:
Modifying the home page layout
Adding or customizing views
Adding and deleting users
Modifying access levels
Adding, modifying or deleting roles
Modifying the home page layout
While you can customize the basic layout of the home page using FrontPage 2002, the SharePoint team Web site UI is much more efficient for most tasks, since it offers easy drag and drop functionality.
From the team site, click on Site Settings.
Select Customize home page layout.
Select a list from the left-most column and drag it to the desired location on the home page.
Click Save.
Adding or customizing views
While you can edit pages and views using FrontPage 2002, adding or customizing a view is a very simple process from within the SharePoint team Web site UI and it is thus likely to become the preferred method for this task for most users.
From the team Web site, select the List or Document Library you wish to customize.
Click on Modify settings and columns.
Click on Create new view.
Name the view, select which columns should appear in the view and in what order (left to right), apply any sort as appropriate, apply a filter to see only a subset of items (such as <Modified By> <is equal to> <[me]> for users to see only the items that they have modified), and select the number of items to be displayed.
Click OK.
Adding or deleting users and modifying a user's role
Adding or removing users can be accomplished in the SharePoint UI by the site administrator or her delegate.
Adding a user
User accounts can either be domain or non-domain accounts. It should be noted that users can also be added using the Invitation feature.
From the team Web site, click on Site Settings.
Under Users and Roles, click on Manage users.
Click Add a user.
Select whether to add a user or add a user from the domain.
Choose the role level for the user.
Click Add user.
If adding a user from the domain, that user can access the site using their domain credentials. If adding a non-domain user, a local account is created with the name and password that you supplied. If sending an invitation, the non-domain user's password is generated by SharePoint Team Services – users are advised to immediately change their password for security reasons.
Deleting a user
The process of deleting a user differs depending on whether the user account is a domain or non-domain account.
Deleting a domain account user
If a user is a domain account user, by removing that user from all roles, his account is effectively deleted, as far as SharePoint team Web site's are concerned. However, a domain account cannot be deleted by SharePoint Team Services.
From your team Web site, click on Site Settings.
Under Users and Roles, click on Manage users.
Select the domain account users you wish to remove.
Click on Remove selected user(s) from all roles.
Deleting a non-domain account user
If a user is a non-domain account user, the site administrator, or her delegate, can remove the user from all roles, but this will not actually delete the account. This differentiation, while slight in terms of access, becomes important when virtual account limits are in effect. One can remove a user from all roles and effectively cut off that user's access to the site; however, the virtual account will still exist. To delete a virtual account one must do the following:
From your team Web site, click on Site Settings.
In the Web Administration section, click on Go to Site Administration.
Choose Click here to add or delete accounts.
Select the user you want to remove.
Click on Delete selected user(s).
If, at some point, you are trying to add non-domain account user and receive the error message: "Error adding one or more users: the following user names already exist:", the reason is most likely that the user was removed from all roles, but the account still exits on the server.
Modifying a user's Role
From your team Web site, click on Site Settings.
Under Users and Roles, click on Manage users.
If you are in a subweb and you have not assigned unique permissions, you will receive the message "This page is available only for a Web with unique permissions." If you are in the root Web, or if your subweb was assigned unique permissions, you will see a list of users.
Click on the user whose role you wish to adjust.
Select (or deselect) the roles to be assigned to a user.
Click on Submit. Roles will be updated.
Modifying access levels
A site manager or her delegate can decide whether a SharePoint team Web site is able to be accessed anonymously or only by users who are explicitly granted access to the site. Additionally, she may grant an access level other than browser. By default, anonymous access is granted on a SharePoint team Web site, at the browser level. To change this:
From your team Web site, click on Site Settings.
In the Web Administration section, click on Go to Site Administration.
Choose Change anonymous access settings.
If desired, select to turn anonymous access off.
If anonymous access remains on, select the role level to grant to anonymous users. All role levels available on the site are possible options. Be extremely careful when selecting a new role level for anonymous users.
Click on Submit.
Adding, modifying, or deleting roles
Roles are a very powerful tool for granting users particular access rights to the SharePoint team Web site. In addition to the five roles that are available by default, a site administrator can create new roles. By creating defined roles, such as Usage manager, the site administrator can delegate the authority to administer certain pieces of the site. In the above example, she would be delegating the responsibility for analyzing site use.
Adding a role
From your team Web site, click on Site Settings.
In the Web Administration section, click on Go to Site Administration.
Under Users and Roles, click on Manage roles.
Click on Add a role.
Give the role a name and description.
Assign rights to the role by clicking on the appropriate check box(es).
Click on Create Role.
The role has now been added to the master list of roles for that Web. For the role to be assigned to a user, the site manager must go to the Manage Users section of the Administration page and assign it from there.
Modifying a role
From your team Web site, click on Site Settings.
In the Web Administration section, click on Go to Site Administration.
Under Users and Roles, click on Manage roles.
Select the role you wish to modify.
Make the desired changes.
Click on Submit.
Deleting a role
From your team Web site, click on Site Settings.
In the Web Administration section, click on Go to Site Administration.
Under Users and Roles, click on Manage roles.
Select the role that you wish to remove.
Click on Delete selected role(s).
Customization within FrontPage 2002
FrontPage 2002 tightly integrates with SharePoint Team Services. As mentioned in the first section, many of the customization capabilities offered via the team Web site can also be accomplished using FrontPage 2002. However, there are other capabilities that are available only with the use of FrontPage version 2002. Use Microsoft® FrontPage 2002 to:
Apply a FrontPage Theme
Insert graphics
Change the navigation of a site (creating new link bars or modifying pre-existing link bars)
Add a component to the homepage
Apply Rules
Applying a FrontPage Theme
From FrontPage 2002, open your Web.
Open the home page (if you want to see how the theme looks on the page).
From the menu bar, select Format, Theme.
Choose to apply theme to Selected page(s), if you want the theme applied to just the home page.
Note: The theme preview Format Themes dialog does not display an actual representation of what a given theme will look like when applied to a SharePoint team Web sites. A best practice is to apply a theme of interest first to the home page to determine if it provides the look you are trying to achieve. Once you've determined which theme you'd like applied over the entire site, you can select to apply the theme to All pages.
Select the desired theme.
For applying themes to SharePoint team Web sites, be sure the box indicating to apply the theme using Cascading Style Sheets (CSS) is checked.
Click OK.
Save your page (if you had the home page open).
Insert graphics
From FrontPage 2002, open your Web.
Open the page on which the graphic will be placed.
Place the cursor where you want to put the graphic.
On the menu bar, select Insert, Picture, From File, and browse to the location of the image file.
Click on the image and click Insert.
Save your page.
Creating or modifying navigation
Creating navigation
If a site administrator or her delegate wants to include navigation bars in addition to the Quick Launch and Global Navigation bars included in the default SharePoint team Web site, she may do so. To add a link bar,
Using FrontPage 2002, open your Web.
Open the home page (or other) for editing.
Select where you want to insert the link bar on the page.
On the File menu, select Insert, Navigation.
Select Link Bars, and click Next.
Select a theme or use the page's theme.
Choose the orientation of the link bar (vertical or horizontal).
Click Finish.
In the Link Bar Properties dialog box, select Create New.
Add links as desired and arrange as preferred.
Click OK.
Modifying navigation
SharePoint team Web sites have a global navigation link bar and a Quick Launch link bar installed by default. Using FrontPage 2002, a user with the appropriate role can add to or remove links from those link bars. For instance, links are added to the Quick Launch navigation in the order that they are created. A site administrator may prefer to have these links appear in alphabetical order, or grouped by type. The administrator can use FrontPage 2002 to modify the link bar to reflect these preferences.
Using FrontPage 2002, open your Web site.
Open the home page for editing.
Right click on the navigation bar you want to edit, and click Link Bar Properties.
Select Add link, Remove link, or Modify link depending on your changes. Or, if you want to change the order of the links, select the appropriate link and click Move up or Move down.
Click OK.
Add a component to the a page
Components can be added to your SharePoint team Web site that allow you to easily get information from other sources on the Web. For example, you can add a component that gets stock price information.
Using FrontPage 2002, open your Web site.
Open the page to which you want to add the component.
Place the curser where you want the component located on that page.
From the menu bar, select Insert, Web Component.
Choose the component type you want to add to the page, for instance, MSN component, and the component itself, for instance, Stock Quote.
Click Finish.
Save your page.
Apply rules
FrontPage 2002 provides the ability to set up workflow rules on document libraries. For instance, one can easily set up a rule that when a document is saved into a specific document library, approval must be granted from a specific person. When the rule is in effect, an e-mail is generated that is sent to the approver that informs him of a document pending approval. This is a simple example of the rules capability.
There are several simple but useful rules, including expiration of a document, requiring approval, archiving expired documents, making backup copies of all approved documents, creating an announcement on the home page for documents containing specific keywords or properties, and sending e-mail notifications to specific users when a document containing specific attributes is saved.
The rules can be as simple or as complex as the site manager desires. For example, a rule can be set that requires approval. Depending on the action of the approver, additional rules can execute based on whether the document is accepted or rejected. If the document is rejected, one rule might assign the document back to the author and add a task for that author to the task list. If the document meets with initial approval, a different rule might send the document to another person for review. In this manner, one can set up document libraries with workflow processes specific to that library.
To create a rule:
Using FrontPage 2002, open your Web site.
If you do not see your folder list, click View, Folder list.
Expand the root folder.
Right click the document library folder to which you want to apply a rule, and click Properties. (The default document library folder is called Shared Documents.)
Click the Rules tab.
Click Add.
Follow the instructions in the Rules wizard to create your rule.
Other Customizations
There are a few other customizations you can accomplish neither through FrontPage nor through the SharePoint Team Services Web site UI. All of these have to do with SharePoint Team Services "in general" as opposed to specific modifications of a site.
Customizing the site template
It is possible to customize the default properties of lists, document libraries, site layout, etc. A common scenario that calls for this would be the desire to give groups within a company the ability to create a SharePoint Team site based upon a company standard. Each group, then, does not need to make individual customizations to, for example, add document templates or add the company logo.
There are a few things that need to be noted:
Only a single template can be used per Web server, so this solution makes sense in environments where all sites hosted on a server will require the same customizations.
To access the files, the developer needs access to the server.
Customizing templates using Collaborative Application Markup Language (CAML)
CAML is the Collaborative Application Markup language that is used to build and customize SharePoint Team Services Web sites. This XML-based language can do the following:
Provide schema definition to the site provisioning system about how the site looks and acts
Define Views
Define Forms
Act as a rendering language that performs functions in the .dll file, such as pulling a value from a particular field
One would use CAML as opposed to editing using FrontPage 2002:
If universal changes need to be made to a site, like adding a new logo that would apply to the main pages of every site created
If content type changes need to be made, such as adding Flash movies to the team Web site
Because it provides the ultimate in customization and flexibility; manipulating CAML allows a developer total control over site provisioning
Locations for key files
CAML, the XML language used throughout SharePoint Team Services, is found in many places throughout SharePoint team Web folders. The locations of files where you can edit XML include:
Program Files\Common Files\Microsoft Shared\web server extensions\50\templates\1033\xml – this is where you find the core XML files, including BASE.xml, docicon.xml, FLDTypes.cml, onet.xml, and stdview.xml
Program Files\Common Files\Microsoft Shared\web server extensions\50\templates\1033\Layouts\Tasks, \Announce, \Contacts, \CustList, \Discuss, \DocLib, \Events, \Favorite, \Voting. All of these folders include a schema.xml file that describes how each of these objects are handled within SharePoint. Each of these folders also includes .htm files that reference CAML.
Adding a List Template
The file ONET.xml contains several XML elements that can be customized:
Topmenuitems – a collection of elements representing the top navigation menu for each sub-web.
Listtemplate – there is a <listtemplate> element for every list and list type in the template. Each <listtemplate> defines a type of list that will be available to all webs on the site. Further, you can specify that a list is automatically created on all new sites.
Documenttemplates – this element contains all the templates that can be set as the default template for the document library.
Documenttemplatefiles – this element contains the locations of any files required for the <documenttemplate> record which holds it.
For every list that you want to add to the default template, you need to add a list template to ONET.xml. To do this:
Open ONET.xml in Notepad.
Add a new <listtemplate> record to the <listemplates> XML element – for instance, a new list that is pre-populated with project phases. The final record for the list template looks like this:
<ListTemplate Name="projphases"
DisplayName="Project Phases"
Type="178"
BaseType="0"
Default="TRUE"
OnQuickLaunch="FALSE"
SecurityBits="111"
Description="List of project phases."
Image="_layouts/images/ittask.gif"></ListTemplate>
The Name is the same name for the list template; there should be no spaces. The image referred to in the last line is the image that appears in the title area of a page; it was customized as well by placing the new image in the <drive>:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\50\Templates\1033\Images directory.
Pre-Populating a list template
Each list requires template files. These files are located at <drive>:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\50\Templates\1033\Layouts. The following folders at this location contain template files that can be used to pre-populate the list template:
Announce
Contacts
CustList
Discuss
DocLib
Events
Favorite
Tasks
Voting
Each folder contains different files appropriate to the content type. Further, each list type included in the template has a Schema.xml file associated with it; this file defines the design of the list and any data that it might contain. In this example, the Project Phases list is a generic list, so we will use the CustList folder as our source of template files:
Create a copy of the CustList folder in the Layouts directory.
Rename it to the friendly name of the list that was created (in this example "Project Phases").
Once the template is created and the list type directory is copied and renamed, the pre-populated information can be added. This information is added by editing the Schema.xml file in the newly created template folder. If there is no <data> element, it needs to be added. It should be added inside the <list> element as the last entry after the <metadata> element. In this example of project phases, we want to capture the project phase title, user information as to who entered the project phase title and who may have last modified the project phase title. Therefore, two sample entries for the schema.xml file of the projphases template look like:
<Data>
<Rows>
<Row>
<Field Name="Title">On Hold</Field>
<Field Name="Author"><ows:UserID/></Field>
<Field Name="Editor"><ows:UserID/></Field>
<Field Name="owshiddenversion">0</Field>
</Row>
<Row>
<Field Name="Title">Planning</Field>
<Field Name="Author"><ows:UserID/></Field>
<Field Name="Editor"><ows:UserID/></Field>
<Field Name="owshiddenversion">0</Field>
</Row>
</Rows>
</Data>
Adding a company logo
It is possible to specify the home page logo that will be used when users create new sites using the Self-Service site provisioning add-in to SharePoint Team Services. To do this:
Navigate to the Program Files\Common Files\Microsoft Shared\web server extensions\50\Templates\1033\Images folder.
Rename home.gif to home_old.gif.
Copy your logo to the directory and rename it home.gif.
Note that this only works with GIF type images.
Adding a document template
You can create standard document templates that are available across all sites and all document libraries as one of the Document Template Type choices for creating a new document from the SharePoint team Web site. To do this:
Create your document template in the appropriate application.
Add a new folder named <YourCompany> to the <drive>:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\50\Templates\1033\Layouts\DocLib\Template\ folder.
In that folder, add your document template.
Modify the ONET.xml file by created a new <documenttemplate> element.
The resulting XML reads:
<DocumentTemplate
DisplayName="ProductSpec"
Type="105"
Description="A product specification template.">
<DocumentTemplateFiles>
<DocumentTemplateFile
Name="<YourCompany>\ProductSpec.dot"
TargetName="ProductSpec.dot"
Default="TRUE"/>
</DocumentTemplateFiles>
</DocumentTemplate>
In the DocumentTemplate element, the type must be a unique number. For instance, the DocumentTemplate element for a Blank Word Document is Type="101". Since the EntireNet template is not a multi-file template, like Excel, only one <DocumentTemplateFile> element was created. If a multi-file template is created, there are several <DocumentTemplateFile> elements within one <DocumentTemplate> element. For instance, the Excel template reads:
<DocumentTemplate
DisplayName="Blank Microsoft Excel Document"
Type="103"
Description="A blank Microsoft Excel Document.">
<DocumentTemplateFiles>
<DocumentTemplateFile
Name="xl\xltmpl.htm"
TargetName="template.htm"
Default="TRUE"/>
<DocumentTemplateFile
Name="xl\sheet001.htm"
TargetName="template_files/sheet001.htm" />
<DocumentTemplateFile
Name="xl\sheet002.htm"
TargetName="template_files/sheet002.htm" />
<DocumentTemplateFile
Name="xl\sheet003.htm"
TargetName="template_files/sheet003.htm" />
<DocumentTemplateFile
Name="xl\filelist.xml"
TargetName="template_files/filelist.xml" />
<DocumentTemplateFile
Name="xl\style.css"
TargetName="template_files/stylesheet.css " />
</DocumentTemplateFiles>
</DocumentTemplate>
Mapping the document template Icon
If a Document Format icon graphic does not already exist in the docicon.xml file, it needs to be added. An icon can be mapped by opening the docicon.xml file in the <drive>:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\50\Templates\1033\xml directory. A mapping element is created within the <byextension> element. It reads:
<Mapping Key="vst" Value="icvst.gif" />
The Key is the document format extension and the Value is the name of the icon file. When creating a new mapping, add the icon to the D:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\50\Templates\1033\Images directory.
Customizing the default cascading style sheet (CSS)
SharePoint Team Services sites use a cascading style sheet, ows.css, located at <drive>:\Inetpub\wwwroot\_layouts\styles. You can modify this file using a text editor or Microsoft Visual Interdev.
Using Active Server Pages (ASP) in a SharePoint Team Web site
It is possible to use ASP pages in a SharePoint Team Web site. However, you cannot place FrontPage components on ASP pages.
Conclusion
SharePoint Team Services provides a useful team Web site out-of-the-box. Teams can be up and running with document libraries, calendar, contact lists, and other collaborative features in literally a few hours. While the default settings will often suffice, users and administrators alike will appreciate the ability to customize everything from look and feel to document workflow rules.