Authored site elements are typically deployed by using the Office SharePoint Server 2007 Content Deployment feature or the content migration programmable interface. Custom artifacts can also be installed as part of a solution package (see Review of tools and processes). For more information, see Plan content deployment and Content migration overview (http://go.microsoft.com/fwlink/?LinkID=86999&clcid=0x409).
Artifacts are essential authored site elements for designing and building publishing sites such as corporate Internet presence sites or enterprise intranet portal sites. They provide the framework in which your site's Web pages will be displayed, including the branding of the pages, their appearance, navigation links, and other common elements. Even in non-publishing scenarios, custom artifacts can make Web sites more recognizable, useful, and appealing. An initial set of artifacts are created when you create a new site collection in Office SharePoint Server 2007. By using the Office SharePoint Server 2007 user interface and programs such as Microsoft Office SharePoint Designer 2007, you can modify these files and resources and add new ones.
The following sections describe the three types of customizable artifacts. For links to resources for customizing authored site elements, see the Page design roadmap.
Master pages
A master page in a publishing Web site defines the outer frame of the Web page. It contains the features, such as navigation links, that you want all pages in your site to share, and it provides a single place to control all of those features. Typically, a site uses a single master page, although large Internet sites might use more. For example, a corporate Web site that is used to publicize more than one product could use separate master pages so that the content for each product is properly branded.
Note: |
|---|
|
There are two types of master pages: site master pages and system master pages. The site master page is used on published Web pages in your site. It is the master page that site users and visitors see when they view published content. The system master page supplies the layout of pages in the site that implement the user interface for commands —for example, Document Library Settings. The system master page is also used in some team site templates — for example, Wiki Site and Document Workspace.
|
Master pages for all sites in a site collection are stored in the Master Page gallery in the top-level site in the site collection. Because the Master Page gallery is a SharePoint library, master pages have all the features of documents in Office SharePoint Server 2007, such as versioning, auditing, workflow, check-in and check-out, and content approval.
Layout pages
A layout page is an Active Server Page Extension (ASPX) page that defines a layout for a type of content page. When a SharePoint site user opens a page in a browser, that page's associated layout page is first combined with the active master page, which supplies the outer frame of the page, and then the contents of the page are rendered in the fields (called field controls) on the layout.
You design layout pages to match the contents of a type of content page. For example, if a content page type has two images, the associated layout page should have fields in which to display both images. You can design multiple layout pages for the same content page. For example, for a page with an image, you may have one "image left" layout page and one "image right" layout page.
Layout pages for all sites in a site collection are stored in the Master Page gallery in the top-level site in the site collection.
Cascading style sheets
Cascading style sheets define styles, such as fonts, colors, or alignment, for the various elements of a Web page. In sites based on Office SharePoint Server 2007, one or more cascading style sheets can be associated with master pages. Each master page included in Office SharePoint Server 2007 has an associated cascading style sheet that is stored in the Styles library in the top-level site of a site collection. For example, the Blueglassband master page is associated with the zz1_BlueGlass style sheet.
When a layout page is loaded, it uses the cascading style sheet information from the current master page. A layout page can also include its own inline cascading style sheet definitions. Because it is loaded after the master page, style conflicts between a layout page and a master page are resolved in favor of the layout page.
A Styles library is available in each Office SharePoint Server 2007 site, and you can create your own cascading style sheets and add them to a Styles library. When you do this, you can specify your own style sheet as the alternative style sheet for a site. (You can also link to an external style sheet as the alternative style sheet.) Because a site's alternative style sheet is loaded last, style conflicts between it and the current master page or layout page are resolved in favor of the alternative style sheet.
Web content includes HTML, images, and other resources used to compose the Web pages displayed in your site. Authors create Web page content in Pages libraries in Office SharePoint Server 2007 sites. Resources used to help create Web content are stored in other libraries. For example:
For an overview of Web content and Web page options in Office SharePoint Server 2007 sites, see Plan Web pages and Plan Web page authoring.
The primary tools used to deploy authored site elements are:
-
Content deployment
-
The migration APIs
-
Solutions packages
Content deployment
Content deployment copies content from a source Office SharePoint Server 2007 site collection to a destination site collection. The entire source site collection can be copied, or a subset of sites can be copied. In either case, content deployment is incremental by default, deploying only changed pages and related assets (such as images). A Quick Deploy feature supports deployment of a single page by authors.
Because authored elements, such as master pages and layouts, are content items that are stored in a document library or gallery, they are deployed along with the Web pages, graphic files, and other content that composes a SharePoint site. For example, if a site is published as an Internet presence site and, in the authoring site collection, a change is made to a master page or cascading style sheet, that change will be deployed to the production site collection along with any new or changed content pages. For more information, see Review of tools and processes and Plan content deployment.
Migration APIs
SharePoint Products and Technologies content migration provides a highly flexible set of application programming interfaces (APIs) that support migrating content and its dependencies into Office SharePoint Server 2007 and Windows SharePoint Services 3.0 sites. The content can originate from another SharePoint site or from an external source.
SharePoint content migration is based on an export/import model. First, the developer exports the custom Web site data, dependencies, and site structure into data files that are rolled up into one or more content migration packages. Then, an administrator on the destination farm imports the content migration package, and its contents are unpacked, and the data, dependencies, and structure are reconstituted on the migration target.
The content migration object model APIs are contained in the Microsoft.SharePoint.Deployment namespace. They are flexible, and you can migrate an entire Web site, a subset of a site's contents, or even a single list or library item.
For more information on the migration programming interfaces, see Content Migration (http://go.microsoft.com/fwlink/?LinkId=103094&clcid=0x409).
Solutions
As described in the Windows SharePoint Services 3.0 SDK, a solution is a deployable, reusable package that can contain a set of features, site definitions, artifacts, and assemblies that you can apply to a site, and can also enable or disable individually. Solution packages can be used to package artifacts such as layout pages and master pages, but not general Web content, and deploy them to authoring, pilot, or production farms. For more information, see Review of tools and processes.