In this section, we'll demonstrate how to publish a site using SharePoint Server 2007. The most common reason for doing this is to create a public site that has a staging site in which the content is first created. Because an Internet-facing site represents your enterprise to an external audience, it will be the focus of management concern over content, design, and presentation. SharePoint has increased the power of the user to create not only content, but sites as well, and this increased power enables end users to publish content directly to a public Web site without having to involve system administrators or developers.
Consistency, standards, and control might seem to be in conflict with artistry in creating Web pages and sites, but they have been the backbone of art historically and they are essential in Web sites today. Every business entity has policies to control business processes. Today Web site content and structure is a business process. It might be safe to say that the structure of your Web presence has an equally important impact on your business structure just as your business structure has on your Web site. With the flexibility and openness of SharePoint, it is essential that you have the correct technology in place to enforce your organization's business policies with regard to information flow.
Another reason to use WCM in SharePoint Server 2007 is for its ability to reuse content. What you need to increase efficiency is pre-approved text and pictures that you know will not create problems, will reflect the organization's standards, and can be used in more than one location on your Web. You might be thinking of stock photos and boilerplate text at this point. However, bear in mind that having reusable content created by personnel who are dedicated and trained in that area continues the separation of the technology of building Web pages from the creative of content creation and ensures that content reuse is leveraged effectively.
Finally, branding is a key reason for having a staging and publishing site in SharePoint Server 2007. Branding, or the consistent look and feel of a Web site, was not a big issue when a small group of developers had to code each page. However, the task of standardizing large numbers of sites and Web pages so that they have the same look and feel needs to be controlled by a technology that makes creating the content easy and maintaining the branding automatic. In addition, you need sources of content for Web pages and sites that are easy to locate and replace throughout your implementation when they need to be updated.
Real World An Installable Feature: Publishing
Although pure Windows SharePoint Services site templates (Blank, Team, Workspaces, Wiki, and Blog) do not support WCM by default, publishing is a feature that can be activated on any site or portal based on SharePoint Server 2007. The Publishing feature activation is what enables the publishing processes, not the template of the site. Features are discussed at length in Chapter 26, "Introducing Features."
If a particular feature is not available for your site collection, you can extend that features to all sites at by opening Central Administration under the Operations tab and then, inside the Upgrade And Migration section, selecting the Enable Features On Existing Sites link. You might need to use STSADM.EXE to install just one feature on a particular site collection. You can examine the available features in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Features.
The command line for installing the publishing site feature is as follows:
STSADM.EXE -o activatefeature -filename Publishingsite\feature.xml -url http://<sitename>
This command line will also install the Publishing Layouts and Publishing Resources features that are required for a publishing site.
Note that although STSADM.EXE is not in your default path for executables, STSADM.EXE knows the location of the features folder and, thankfully, does not require the full path.
After the feature is installed in the site collection, use the Site Features link on the site's Site Settings page to activate the Publishing feature.
Installing and activating the publishing site feature creates the standard lists needed for publishing (Documents, Images, Pages, Site Collection Documents, Site Collection Images, Cache Profiles, Style Library, Reports List, Reusable Content, and Workflow Tasks) and populates the Master Page And Page Layout Gallery with the 13 additional master and layout pages used in publishing sites. It also adds 14 new management links in Site Settings.
You might need only sub-Web sites configured as publishing sites, not sites higher in the hierarchy. This arrangement is possible, but features are scoped to the site collection, not to the site level. If your site collection started as a Windows SharePoint Services 3.0 template, first use STSADM.EXE to "activate" the Publishing Resources and Publishing Layouts features at the site-collection level, but do not activate Publishing in the features listed at the Top Level Site Settings.
Then use STSADM.EXE to activate the Publishing Web feature on the sub-Web-site URL, and in the Site Settings for that site, activate Publishing. You will now have a publishing site at a lower level but a team site above it. Command-line examples are as follows:
STSADM.EXE -o activatefeature -filename publishingresources\feature.xml -URL http://extranet/sites/SiteCollection2/ STSADM.EXE -o activatefeature -filename publishinglayouts\feature.xml -URL http://extranet/sites/SiteCollection2/ STSADM.EXE -o activatefeature -filename publishingweb\feature.xml -URL http://extranet/sites/SiteCollection2/SubWeb1/
Some of you might be coming from a Microsoft Content Management Server (MCMS) 2003 background. If so, you'll need to learn the new terminology for WCM in SharePoint Server 2007. Table 11-3 outlines the terminology changes from MCMS 2003 to WCM.
When this is said:
Windows SharePoint Services Sites
Channels (or areas, in SharePoint Server 2003)
Page layouts or master pages
Master Page and Page Layout Gallery
Images, document, site collection images, or Site Collection document library
Images or reusable documents
Before you can create deployment jobs and paths, you must enable the feature in the receiving farm to accept incoming connections. The pecking order works like this: enable the feature, set up a path, and then create one or more jobs for each path. The path will inform WCM which site is the staging site and which one is the public site. The jobs will inform WCM about the schedule and other elements of getting the content from the staging site to the public site. When you enable publishing in the farm, you'll be configuring the following elements:
In the content deployment setting, you can enable the farm to accept incoming jobs, even if it is the same as the farm that is the sending farm.
Determine which servers will be responsible for importing, exporting, or both.
Enable encryption for better security between the sending and receiving servers.
Configure a temporary storage location for files involved in the deployment process.
Create reports to follow the progress of jobs between the sites.
So, here are the steps to publishing a staging site to a public site. First, be sure that you've created a staging site by using a site template. The public site should be a publishing site that has the same template applied.
Next, in Central Administration, navigate to the Content Deployment section in the Operations tab and click on the Content Deployment Settings link. Doing so will bring you to the Content Deployment Settings management page (shown in Figure 11-11).
Figure 11-11: Content Deployment Settings management page
On the receiving farm, or if this is the only farm you have and both your staging and public sites are in the same farm, select the Accept Incoming Content Deployment Jobs radio button. Until you select this radio button, your deployment jobs won't work. You'll also need to select your import and export server and specify whether or not you want to use encryption. Then specify the temporary file location and how many reports you want to maintain, and click OK.
After clicking OK, you'll be taken back to the Central Administration Operation page. Now it's time to click on the Content Deployment Path And Jobs link. This will take you to the Content Deployment Paths And Jobs management page. On this page, you'll have the opportunity to create a New Path, a New Job, or both. A path is how you define the staging (source) site collection and the public (destination) site collection for publishing. A job is how you define the schedule and other configurations regarding how and when publishing will take place along the path.
When you click the New Path button, you're presented with the Create Content Deployment Path page (shown in Figure 11-12). On this page, you'll enter a path name and description. If you plan on publishing a number of different sites, be sure to create a naming convention for the various paths you plan on creating. You'll also need to select the source Web application (and use a good naming convention here, too) and the source site collection within the source Web application. This allows you to select a site collection inside a managed path if desired. You'll also need to type the destination Central Administration URL for the farm that will host the destination site. If you're publishing within the same farm, enter the local Central Administration URL. If you're publishing to a different farm, enter the remote Central Administration URL.
Figure 11-12: Configuring the connection for the publishing path
Next, you'll need to specify the authentication account information that has Write access to the destination site collection. Then, as part of the configuration efforts on this page, you'll click the Connect button. Until you can get a successful connection, you won't be able to finish configuring this management page.
Error messages at this stage will be embedded in the page and will be context sensitive. Be sure to read them to help you troubleshoot the connection if the connection attempt fails.
After the connection attempt has succeeded, you can select the destination Web application and site collection (as shown in Figure 11-13). You can also select whether or not to deploy user names and security information. After you have configured these options, click OK and the path will be created.
Figure 11-13: Selecting the destination Web application and site collection
After you've created the path, it's time to create the job for that path. Click New Job, enter a title for the job, and select which path you want this job to apply to (see Figure 11-14). Notice that you can select individual sites within the site collection you want to publish on this schedule. Remember, you might have different sites within the collection that need to be published on different schedules. To attain this type of setup, you create different jobs for the same path, selecting different sites within a single site collection.
Figure 11-14: Creating a new content deployment job
Under the Deployment options on this page (not illustrated), you can select (essentially) either an incremental publishing schedule by selecting the Deploy Only New, Changed Or Modified Content radio button or a full publishing schedule by selecting the Deploy All Content radio button. Ensure you've selected the notification options that you would like and then click OK.
At this point, the staging and destination site collections have been configured and the scheduling job has been created. Now your content should be copied over on schedule from the staging site to the production sites.
To ensure that the job will run correctly, click the down arrow next to the job on the Manage Content Deployment Paths And Jobs page and select Test Now. This will run a test of the job along the path you have selected to ensure that future jobs will run correctly.