Tuesday, February 16, 2010

Customizing SharePoint Sites and Portals (V2)

Introduction


Customization is the ability to change the layout, view, content, and site structure for a group of users such as a department or corporation. To help ensure consistency, Windows SharePoint Services and SharePoint Portal Server 2003 enable only Web Designers and Site Administrators full customization privileges for managing the look and feel of a site.

SharePoint Portal Server enables you to create Web portals that aggregate information from various sources into one convenient page. Team members and users can reach important business information, documents, and applications from one central access point.

The portal architecture and Web Part components determine how a site appears and manage all browser functions. Each portal site consists of reusable and customizable Web Parts that determine how information is presented. Administrators and site owners can use these components to customize how a Web portal looks and functions. You can modify existing Web Parts or create your own to achieve a unique look for your organization's site.

An individual user can also import Web Parts from a catalog or from Microsoft Office System applications to create his or her own personal portal view that organizes and presents only the information he or she wants.

Customizing a SharePoint Site

SharePoint sites are designed to be flexible. You can tailor a site to fit your users' needs by adding or removing pages, changing the appearance of pages, changing the site navigation, and making other customizations.

To customize SharePoint sites, you must have the following rights, which are included in the Web Designer and Administrator site groups:Manage Lists

Add and Customize Pages
Apply Themes and Borders
Apply Style Sheets

Other users of your site cannot gain access to the pages required to perform these tasks unless you specifically assign them to a site group that contains these permissions.

Customizing Web Sites From Within the Browser

You can perform basic customization from within the browser, using links from the Home, Create, and Site Settings pages of the Web site. From the browser you can perform basic customizations such as the following:

Add a list
Change the layout of the home page
Change the picture on the home page
Add a Web Part to a Web Part Page
Change a site's display name (not the URL)
Apply a theme

For more information about customizing Web sites from within the browser, see the Microsoft Windows SharePoint Services Help.

Customizing Web Sites by Using Web Page Editing Tools

Using a SharePoint–compatible Web page editor, such as Microsoft Office FrontPage® 2003, you can perform additional customizations such as the following:

Add borders to pages
Insert graphics
Add components to the home page

Change the navigation of a site


For example, if you create a custom theme for a SharePoint site in FrontPage 2003, and add the theme name to the list of themes in FrontPage 2003, you can edit the list of available themes in Windows SharePoint Services to include your new theme. An XML template called spthemes.xml contains the theme name, style sheet location, thumbnail, preview, and description of each theme that is available through the browser. You use this XML file to render the theme selection page. You can modify this XML file (by opening it in any text editor, such as Notepad) to include a custom theme on the Apply Theme to Web page. For more information about creating a theme and adding it to the list of themes in FrontPage 2003, see the Microsoft Office FrontPage 2003 Help.

Note To edit the spthemes.xml file, you must be a member of the local administrators group for the server.
 
Ref: Customizing SharePoint Sites and Portals: Part 1
http://msdn.microsoft.com/en-us/library/dd583126(office.11).aspx

Templates and Site Definitions

There are two ways you can customize SharePoint sites. You can use custom templates or create site definitions. Custom templates enable you to customize a site by using the user interface (UI). For example, you can derive a custom list from an existing list, or create a custom list to use as a list template that Site Administrators can choose from a list of available list templates. Windows SharePoint Services stores all custom templates in the content database. You can customize list and site templates from Top-level Site Administration or by using Microsoft Office FrontPage 2003. For more information about using FrontPage to customize SharePoint sites and portals, see Customizing SharePoint Sites and Portals, Part 1.

Site definitions are composed of multiple files located in the file system of each Web server. Site definitions and templates work together to customize a site. Custom templates are always associated with the site definition on which the template is based. A custom template depends on the base site definition in the file system in order to work. A custom template is the difference between a site definition and the state of the site after a template is generated. The template tracks changes to the site definitions that are stored in the configuration database. This article describes the advantages and disadvantages of using custom templates and site definitions and provides guidance about when to choose one over the other, and how to avoid overwriting custom templates and site definitions when installing product updates.

Creating Custom Templates

Now that we know that custom templates track changes to a SharePoint site definition, we can examine the different types of custom templates. List templates track changes to columns, forms, pages, and optionally, changes to the content associated with a specified list. Site templates track changes to site navigation, Web Parts, lists present on a site, and optionally, changes to the content of a single site. You can save an existing site as a site template.

Note There is a 10 MB quota on the total size of the content you can store in a site template. You can determine the size of site content by going to Top-Level Site Administration, and in the Management and Statistics section, clicking View site usage data.

A custom template is persisted as a file with an .stp extension, which is actually a .cab file that you can rename with the .cab file extension and open in Windows Explorer. This file includes one Manifest.xml file in Collaborative Application Markup Language (CAML) that the server generates as a subset of the Microsoft SharePoint Migration Tool (Smigrate.exe) manifest file format. For more information about SMIGRATE, see "Introduction to Templates and Definitions" in the Microsoft SharePoint Products and Technologies 2003 Software Development Kit (SDK).

Let's say that you created a site, customized it by adding lists, events, document libraries, custom Web Parts, and applied a special theme. You want to share this piece of work with other site owners or impose this site template on any subsites. On the Site Settings menu, click Go to Site Administration, and then in the Management and Statistics section, click Save as template. Type a file name using an .stp extension and type a title and description for your site template. You can also select the Include content check box. You save your site as a template in a gallery inside the content database to make it available to other subsites. As long as subsequent subsites are based on the same site definition (for example, on a Document Workspace) and have the identical language of the original site, you can create subsites using this template.

To make the template appear in the list of templates in the Site Creation wizard, you need to export the template to the file system and run the STSADM command tool. To export the template, right-click the template and click Save Target As, and then follow the prompts to save the template. After saving the template to the file system, from a command prompt, type the following:

Copy Code stsadm.exe -o addtemplate -filename "local_drive:\site_template_file_name.stp" -title "Site_Template_Name"

Note You must reset Microsoft Internet Information Services (IIS) before these changes can take affect. After resetting IIS, the Site_Template_Name template becomes available in the site template list during site creation.

You can also export a list template the same way you exported the site template. However, list templates are available only to the site collection of the site from which you exported.

About Collaborative Application Markup Language [CAML]

Collaborative Application Markup Language (CAML) is an XML-based language used for defining collaboration objects for a site. In Windows SharePoint Services, CAML defines sites, lists, fields, views, or forms.

CAML essentially has two major types of elements—those for field rendering and schema definition, and those for page rendering. For example, you can use the page-rendering CAML elements when you need to extract the property of a specific field and render it on a page.

You can also use CAML to define tables in the site database during site provisioning. You can use CAML to customize a SharePoint site and in SOAP messaging to Web services in Windows SharePoint Services to interact remotely with a Windows SharePoint Services deployment. Moreover, you can use CAML in script or code that implements members in the Windows SharePoint Services object model. In this case, you pass CAML strings through method parameters, assign them to properties, or return them by methods and properties.

For more information about CAML, see "Introduction to Collaborative Application Markup Language (CAML)" in the Microsoft SharePoint Products and Technologies 2003 Software Development Kit (SDK).

Ref: Customizing SharePoint Sites and Portals: Using Templates and Site Definitions, Part 2
http://msdn.microsoft.com/en-us/library/dd583127(office.11).aspx

Customizing SharePoint Sites and Portals: Style Sheet Class Reference Tables, Part 3
http://msdn.microsoft.com/en-us/library/dd583128(office.11).aspx
In this article, you'll find Web Part compatibility and style sheet class reference tables to use in your customization

No comments:

Post a Comment