Upgrading an MCMS 2002 Application to SharePoint Server 2007 (Part 2 of 2)
Summary: Learn how to upgrade a Microsoft Content Management Server (MCMS) 2002 application to Microsoft Office SharePoint Server 2007 by using this step-by-step guide and the WoodGroveNet MCMS 2002 sample application. This article is part 2 of 2. (35 printed pages)
Applies to: Microsoft Office SharePoint Server 2007, Microsoft Content Management Server 2002
This article is a continuation of Upgrading an MCMS 2002 Application to SharePoint Server 2007 (Part 1 of 2).
Migrating the Application Code (continued)
Customizing the Master Page
Use the following procedures to start customizing the master page.
To begin customizing the master page
On the Start menu, point to All Programs, point to Microsoft Office, and then click Microsoft Office SharePoint Designer 2007.
On the File menu, click Open Site.
In the site name field, type the address to the Woodgrove site. In our example, this URL should be http://localhost:32490.
In the Web Site Folders pane, expand the _catalogs folder.
Double-click the WoodGrove.master master page that we created earlier.
When you are prompted to check out the file from source control, click Yes.
Click the design mode tab.
An outline of the master page is displayed to give a general idea of how pages using this master page look.
We can identify several areas in this master page. There is a header or logo area, a top navigation area, a left navigation area, and a breadcrumb. And the page already contains controls to provide page editing and even search capabilities. Now all we need to do is to make the elements in these areas look like the elements in Woodgrove.
As we mentioned previously, Office SharePoint Server makes extensive use of CSS files. The BlueBand.master page referred to the Band.css file. Now switch the editor to the code view, use the Search function on the Edit menu to find this reference to Band.css, and change it to WoodGrove.css.
To modify the styles
Open the Woodgrove.css file.
In the Folder Page, expand the Styles.
In the folder list, expand the Style Library node.
Expand the en-us (Style Library) folder.
Expand the Core Styles (Style Library) folder.
Double-click the Woodgrove.css file. You are prompted to check out the file from source control. Click Yes. SharePoint Designer opens an editor window with the contents of this file. If you look at the original styles file for Woodgrove (you can find this file at
….WoodgroveNet\Style), you see that the style for the body established the following font properties : font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
Add this property for the body class.
On the Edit menu, click Search, and then click Find All. A list of all occurrences is displayed below your code window. Review all items in the list, and remove all font-family attributes from all these styles.
Close the Find window when you are finished.
To modify the logo area
In the Woodgrove.master file, switch to Split mode. This mode divides the screen into sections. The lower section is a preview of how the page will look and the upper section shows the actual page code.
Click the Logo. In Split mode, the design view and the code view are synchronized. If you click the page logo, SharePoint Designer changes the position of the code view to the declaration of the page elements that made up the logo.
Figure 24. Code for the company logo in the master page
In this template, a SharePoint:AspMenu is used. We need to add the logo and set the background for this area to black. To do so, we use the <img> HTML tag to refer to the WoodGroveBlackLogo.gif image that we had previously saved in the images folder. This logo resides within a <td>. We can set the background to black just by using a background-color property.
Figure 25. Code inserted to add the Woodgrove logo
On the File Menu, click Save. The Design view is updated to show the new logo.
This page already provides top navigation functionality. But it does not look like the Woodgrove page and it provides dynamic menus. We can handle these two issues now.
To modify the top navigation
Keeping the master page in the Split view, click the TopNavigation element. In the code view the editor is updated and is positioned over a SharePoint:Menu element.
Figure 26. Split view of the Global navigation items
As you can see Office SharePoint Server provides its own PortalSiteMapDataSource controls. And this SiteMapDataSource will pull the information from the SharePoint publishing sites.
This menu is already set to provide the desired navigation functionality.
To get rid of the dynamic menus, change the MaximumDisplayLevels property to 0.
Remove the DynamicMenuStyle, DynamicMenuItemStyle, and DynamicHoverStyle tags because there is no need for them now.
You can also use the SharePoint Designer interface to modify these values. To activate the properties editor, right-click the label, and on the shortcut menu select label properties. A properties editor pane is displayed.
To make the menu look more like Woodgrove, notice that the menu is enclosed inside a <tr> tag and a style called topNavContainer is used. In the Manage Styles pane, look for this style under the WoodGrove.css file. Double-click it.
An editor window for the Woodgrove.css file opens, positioned on the style declaration. Add a background-color:green; attribute.
Go to the File menu, and then click Save.
Go back to the Woodgrove.master page. The Preview updates.
Figure 27. Master page after updating styles
Left navigation is also provided by this master page. However, the Woodgrove left navigation had a white background color and no border.
To modify left navigation
Keep the file in the Split view.
Click the left Navigation control. It shows a SharePoint:AspMenu tag. Examine this tag definition. You will see that it uses a CssClass property with the leftNav1 value.
Use the Manage Styles pane to look for this style under the Woodgrove.css file. Double-click it. It takes you to the style definition. Do the following:
Apply these changes to leftNav2 and leftNav3 styles.
You can also click the style name while pressing the CTRL key. This takes you to the style definition.
The Breadcrumb control is provided by default; there is no need to develop any code to provide this functionality.
The Woodgrove footer just added a copyright notice at the end of the page using a User Control. To do the same in Office SharePoint Server, go to the end of the Design View Pane and type “2002 Woodgrove Bank. All rights reserved".
The built-in authoring console in Office SharePoint Server is a floating menu, less intrusive than the MCMS version, and it provides options for editing your page, versioning, and submitting your work to an approval workflow.
The BlueBand.master that we used as a base already provides these controls. While still in Split view, click at the top of the master page in the Design view. The Code view is then updated showing the use of the wssuc:DesignModeConsole and other authoring tags. We will leave it as is because it already provides the desired functionality. For more information, see Customizing and Branding Web Content Management-Enabled SharePoint Sites (Part 2 of 3): Extending WCM.
Approving Your Master Page
In Office SharePoint Server, master pages are versioned also. You should use approved versions of your master pages to avoid conflicts.
To approve master pages
On the WebSite folders page in SharePoint Designer, right-click the Woodgrove.master page.
On the shortcut menu, click Check In.
Figure 28. Shortcut menu with options to check in a master page
In the Check In dialog box, click Publish a major version, and then click OK.
Figure29. Check In dialog box for a master page
A dialog box appears indicating that this document requires approval. Click Yes.
Remember that you must be using the SharePoint designer as a Site Manager.
A Web page is displayed. The Woodgrove page is shown below the Approval Status: Pending section. Pause the mouse pointer over this label, and a small arrow appears to the right. Click this arrow to display a shortcut menu. Click Approve/Reject on the menu.
Another Web page is displayed. Select the approved option, and then click OK.
Close the Internet Explorer window.
Applying and Testing the New Master Page
To try out your page, you must first check it in and approve it.
To test your master page
Open the Woodgrove site, and then click site settings.
Figure 30. Site Settings page
In the Site Settings page, click Site Master Page Settings. Then, select the Woodgrove.master from the list. You must be working with a user with administration rights in Office SharePoint Server.
Figure 31. Setting the site master page
In the Site Master Page, you can choose a master page from a combo box. Choose Woodgrove.master. Go to the end of the page, and then click OK.
Open the site; it will now use your new master page.
Figure 32. Migrated site using Woodgrove master page
Modifying Default Page Layouts
The content migration tool generates default page layouts for each of your templates, but you must check those page layouts to verify that they provide a look and feel similar to what they had in MCMS. We will compare all the templates with the generated page layouts and edit them with SharePoint Designer to ensure that they are equivalent.
Woodgrove is an ASP 1.x site, and it used some Web controls to provide a similar look and feel for all pages in the site. Most of these elements are already in the master page, so the migration is just a matter of arranging the field controls in the same way as they are arranged in the MCMS templates.
To locate your migrated templates
Open Office SharePoint Designer 2007.
On the File menu, select Open Site.
In the Open Site dialog box, type the URL for the Woodgrove site in Office SharePoint Server, and then click Open.
In the Web Site pane on the left, double-click _catalogs.
Figure 33. Galleries for the site page layouts
The Office SharePoint Server migration tool creates an equivalent folder structure to the template galleries in MCMS. Browse the folder and edit the page layouts.
In Office SharePoint Server, page layouts are versioned. Before editing a page layout you must right-click the item in the Web site pane, and then select Check Out. When you finished, right-click the item and then click Check In; when prompted, publish it as a major version.
Figure 34. MCMS Woodgrove Job Posting.aspx
The migrated form shows the field controls.
<PublishingWebControls:RichHtmlField id="_migidTitle1" FieldName="Title1" runat="server"/><br> <PublishingWebControls:RichHtmlField id="_migidApplicationInstructions" FieldName="ApplicationInstructions" runat="server"/><br> <PublishingWebControls:RichHtmlField id="_migidJobDescription" FieldName="JobDescription" runat="server"/><br> <PublishingWebControls:RichHtmlField id="_migidQualifications" FieldName="Qualifications" runat="server"/><br>
The field controls should be inside a table to maintain a similar look and feel with the Woodgrove template, and they must keep the following order: Title1, Job Description, Qualifications, Application Instructions.
<tr><td><h2>Job Title</h2><PublishingWebControls:RichHtmlField id="_migidTitle1" FieldName="Title1" runat="server"/></td></tr> <tr><td><h2>Job Description</h2><PublishingWebControls:RichHtmlField id="_migidJobDescription" FieldName="JobDescription" runat="server"/></td></tr> <tr><td><h2>Qualifications</h2><PublishingWebControls:RichHtmlField id="_migidQualifications" FieldName="Qualifications" runat="server"/></td></tr> <tr><td><h2>Application Instructions</h2><PublishingWebControls:RichHtmlField id="_migidApplicationInstructions" FieldName="ApplicationInstructions" runat="server"/></td></tr>
Figure 35. Job Posting ASPX page layout updated for Office SharePoint Server
Figure 36. MCMS Case Studies.aspx
The migrated page layout shows the target fields.
<PublishingWebControls:RichHtmlField id="_migidTitle1" FieldName="Title1" runat="server"/><br> <PublishingWebControls:RichImageField id="_migidCaseImage" FieldName="CaseImage" runat="server"/><br> <PublishingWebControls:RichHtmlField id="_migidCustomerSolution" FieldName="CustomerSolution" runat="server"/><br> <SharePoint:NoteField id="_migidXmlContent" FieldName="XmlContent" runat="server"/><br> <PublishingWebControls:RichHtmlField id="_migidCustomerDescription" FieldName="CustomerDescription" runat="server"/><br>
The field controls should be inside a table to maintain a similar look and feel with the Woodgrove template, and they must keep the following order: Title1, CaseImage CustomerDescription, CustomerSolution, XmlContent.
<tr><td colspan="3"><PublishingWebControls:RichHtmlField id="_migidTitle1" FieldName="Title1" runat="server"/></td></tr> <tr><td><PublishingWebControls:RichImageField id="_migidCaseImage" FieldName="CaseImage" runat="server"/></td> <td><h2>Customer Description</h2> <PublishingWebControls:RichHtmlField id="_migidCustomerDescription" FieldName="CustomerDescription" runat="server"/> </td></tr> <tr><td colspan="2"><h2>Customer Solution</h2> <PublishingWebControls:RichHtmlField id="_migidCustomerSolution" FieldName="CustomerSolution" runat="server"/> </td></tr> <tr><td colspan="2"><h2>Details of Solution</h2> <SharePoint:NoteField id="_migidXmlContent" FieldName="XmlContent" runat="server"/> </td></tr>
This template used a custom control for XmlContent. You can use the XML Web Part to replace XmlContent. On the Insert menu, click SharePoint controls, and then click WebPart.
Figure 37. Inserting a Web Part
A Web Parts pane is populated. Select XML Web Part and drag it to the position of the XmlContent field.
Figure 38. Web Parts pane
Figure 39. Case Studies ASPX page layout updated for Office SharePoint Server
The default page layout has the field in the right order, as shown in the following figure.
Figure 40. Home ASPX page layout updated in Office SharePoint Server
This page uses the Latest Press control. This control is replaced by a Content By Query Web Part. For information about changing this control in Office SharePoint Server, see Summary Controls later in this article.
Legal Disclaimer.aspx and DefaultChannelPage.aspx
These pages have only one placeholder, so no changes need to be made.
All you have to do with this page layout is open the page layout in the code view, then edit the page layout code to the following.
<tr><td><PublishingWebControls:RichLinkField id="_migidOCAttachment" FieldName="OCAttachment" runat="server"/></tr> <tr><td>More Information:<PublishingWebControls:RichHtmlField id="_migidOCHTMLEdit" FieldName="OCHTMLEdit" runat="server"/></td></tr> <tr><td><PublishingWebControls:RichHtmlField id="_migidPartnersPH" FieldName="PartnersPH" runat="server"/></td></tr>
Figure 41. Services ASPX page layout updated in Office SharePoint Server
This template is used for authoring from Microsoft Office Word. For more information about using Content Converters for providing this functionality, see Publishing Directly from Office Applications.
To make the page layout look as the original template switch to code view and arrange the fields in the page layout so they have the following order:
This control highlights a group of press postings on the default page of the Press Channel of a site. It builds a table containing HtmlAnchor elements for the postings.
Figure 42. MCMS LatestPress.ascx
However, Office SharePoint Server provides a very useful Web Part, called the Summary Link Web Part. This Web Part is not inserted in a Web Part zone because the original MCMS page layouts did not allow users to move things at run time.
To insert this Web Part
Open your page layout or master page.
In SharePoint Designer, on the Insert menu, click SharePoint Controls.
Click WebParts. The WebParts pane is populated, and you can now browse through the WebParts list.
Figure 43. Choosing the Summary Link Web Part in the Web Part pane
Drag the Summary Link Web Part onto your page layout.
In the Summary Link Web Part, you can specify from which site you want to take the content and which content type these pages should have. You can also specify how they are sorted and grouped, and even limit how many elements to display.
Figure 44. Options pane for Summary Link Web Part
For Woodgrove, we use only pages with the Press Release ASPX content type and sort order them by Modified, and limit the number of items to display to 3. To make this look more like Woodgrove, we disable all advanced settings, such as minimize and others.
This control is used as the default page in a Channel to display a summary of the contents of the Channel
Figure 45. McmsSummary server control
The McmsSummary server control is used in the Summary Page template file. We just add a Web Part reference in the page layout for the Summary Page, and reuse the Content By Query Web Part. This Web Part lists pages with the Case Studies ASPX content type.
The HeadTags.ascx control does not contain images and labels. It only generates META tags. This control uses the RobotMetaTag class to create META tags for the isRobotFollowable and isRobotIndexable properties of the Channel.
The Case Studies page layout used an XmlPlaceholder to display the "Details of Solution" at the bottom of the Case Studies pages. It provided the user interface for a placeholder in both the authoring and presentation modes of the Web Author.
Office SharePoint Server does not provide field controls for XML. You can use the XML Web Part, however. This Web Part allows you to enter XML data and specify an XSLT transformation style sheet to render it.
You can also create your own field controls. For details about creating a field control, see Customizing and Branding Web Content Management-Enabled SharePoint Sites (Part 2 of 3): Extending WCM.
MCMS extranet sites, such as the WoodGroveNet sample site, use forms-based authentication and have specific sections of the site configured for guest or anonymous access. Because no authentication is performed for read-only access for public areas of the site, users do not have to log on to the site to browse those sections. Privileged users to the site can log on to the site using Active Directory credentials.
The WoodGroveNet sample site secures the Partners Channel by limiting the rights of the groups that should not have access, such as the MCMS guest rights group and the authors, editors, and resource managers for the Small Business and About Us Channels.
The following code shows how the WoodGroveNet sample site was configured for forms-based authentication using the web.config file.
<authentication mode="Forms"> <forms name="WoodgroveNet" path="/" loginUrl="/WoodgroveNet/Includes/ManualLogin.aspx" protection="All" timeout="30"> </forms> </authentication> <authorization> <allow users="*"/> </authorization>
Modifying Your MCMS Forms Logon Page to Office SharePoint Server
The WoodGroveNet sample site uses a very different logon page.
Figure 46. MCMS Woodgrove logon page
To provide equivalent functionality, you can easily create an .aspx page using the ASP.NET login controls.
Office SharePoint Server is redesigned on top of the ASP.NET 2.0 infrastructure. You can manage your users by using ASP.NET 2.0 membership providers. Membership providers offer functionality for validating user credentials, creating and modifying membership users, and managing user settings such as passwords and e-mail addresses. For more information, see Managing Users by Using Membership.
When you create a Publishing Portal Site, Office SharePoint Server creates a logon page at the site root, which you can modify. You can re-create the entire logon page by using the ASP.NET 2.0 new login controls.
Figure 47. Logon page for Woodgrove in Office SharePoint Server
For more information, see ASP.NET Login Controls Overview.
For detailed instruction about adding the authentication in Office SharePoint Server, see Customizing and Branding Web Content Management-Enabled SharePoint Sites (Part 3 of 3): Creating and Configuring WCM-Enabled Sites.
Woodgrove uses the MCMS simple approval workflow. By default, Office SharePoint Server uses a serial approval workflow very similar to the MCMS workflow, but more flexible.
Figure 48. Editing toolbar
After a page is submitted for approval, a user with approval permission sees both the Approve and Reject buttons. Assuming the user selects to approve the page, the page becomes a “major" version and is published, or is scheduled if approved but set to a future publishing date.
The author who submitted a page can also see the status of the approval process, as well as cancel this process if he or she chooses for the content.
Figure 49. Approving a Woodgrove Bank page
After the workflow is completed, the page is published.
You can also create workflows that are more flexible by using the Windows Workflow Foundation, which can then be triggered on various events in Office SharePoint Server.
The WoodGroveNet sample site uses ASP.NET-based output caching with the following page directive:
<%@ OutputCache VaryByParam="*" VaryByCustom="cmsrole" Location="Server" Duration="300 %">
The WoodGroveNet sample uses output caching with invalidation to ensure that content served from the cache on the site is always current. When a content change occurs on the site, the entire cache is invalidated, and then MCMS serves requests for postings from the Content Repository.
Office SharePoint Server provides several caching options. While Office SharePoint Server does not allow you to use ASP.NET output caching directives in the same way you do in a standard ASP.NET page, it does provide a more sophisticated framework to reach the same result.
To enable Office SharePoint Server output caching at the site collection scope
In the top-right corner of your main page, click the Settings link.
On the Site Actions menu, click Site Settings.
On the site settings submenu, click Modify All Site Settings.
Figure 50. Site Actions menu and options
A page with several administrative links appears. Click Site Collection Cache Settings.
Figure 51. Changing cache settings
In Site Collection Cache Settings, select the Enable Output Cache check box. Other options are displayed, however, keep the default options and then click OK.
When using these caching features, you can configure caching profiles to control caching page items and complete pages in memory. Developers should notice that Office SharePoint Server 2007 supplies dedicated caches for navigation nodes and content returned from potentially expensive retrieval operations, such as standard Windows SharePoint Services queries run by using an SPQuery object and cross-site queries run by using a Microsoft Office SharePoint Portal Server SPSiteDataQuery object.
Office SharePoint Server 2007 also supports front-end Web server disk caching. If you enable the front-end Web server disk cache, Office SharePoint Server begins writing the large files it retrieves from the Microsoft SQL Server database into a special cache on the local file system. This eliminates the need to move .jpg, .png, .gif, .css, and .js files from the SQL Server database server to front-end Web servers on a per-request basis.
Publishing Directly from Office Applications
The Woodgrove site uses the Authoring connector functionality to allow users to publish content directly from Microsoft Office Word. Look for a PublishingTask.xml file. In WoodGroveNet, this file looks like the following.
<?xml version="1.0" standalone="yes" ?> <tasks> <task> <name>Create a new service for small business</name> <description>This task creates a description of a new service available to small business</description> <template>/Templates/WoodgroveNet/Small Business Net/Services ASPX</template> <channel>/Channels/WoodgroveNet/Small Business/Services</channel> </task> </tasks>
Office SharePoint Server 2007 provides a framework for document converters. This is a component designed to read content from an external format such as an Office Word document and convert it into a format that can be displayed within an Office SharePoint Server 2007 content page. Several document converters are provided with Office SharePoint Server 2007, as well as a framework for building and integrating custom document converters.
To configure the converter Feature for the Services template
Click the Site Actions menu link.
On the menu, point to Site Settings, and then click Modify All Site Settings.
On the Site Settings page, click Site Content Types.
Click Services ASPX. You will see the entry point to the form named Manage document conversion for this content type.
Figure 52. Setting up a content type for document conversion
The resulting form lets you choose which converters are enabled and disables for documents of this content type. Enabling a converter means that the option to convert documents that use this converter will be available to authors when viewing documents in a SharePoint document library.
Keep the From Word Document to Web Page option selected.
Figure 53. Specifying the conversions to allow
Click the Configure settings.
Click Define unique settings for this content type.
In the Page Layout box, click (Services ASPX).
In the field for converted document contents, click OCHMTLEdit.
Select the Remove CSS <styles> section from the converted HTML, and then click OK.
Search is now a default feature in Office SharePoint Server. It is built using SharePoint technology but provides great improvements over search functionality in Microsoft Office SharePoint Server 2003. Improvements and enhancements include the following:
Significantly improved relevancy
Improved performance and scalability
Continuous propagation of index to search servers during crawl
New Business Data Catalog for crawling line-of-business (LOB) systems
Improved metadata management
Collapsing of duplicate results
Automatic hit highlighting of search terms in the title, dynamic summary, and in the URL
Corrections for Did you mean? functionality
Improved search scopes
Automatic language detection
Option for performing custom security trimming of results
Improved and more consistent API for executing searches
Complete administration API
Improved crawl log
The BlueBand.master page, which is used as a base, already adds the search field. There is a default page for showing search results.
Upgrading Woodgrove to Office SharePoint Server is not a painful experience. A good assessment and analysis of the application allows us to plan the tasks to perform. We can use much built-in functionality to perform common tasks that previously required custom code. This article discusses the information you need to gather to help to upgrade Woodgrove successfully, and describes some of the reasoning you might normally following when performing an MCMS migration.
For more information, see the following resources:
Microsoft CMS Base Class Libraries in the CMS 2002 HTML help file (open
C:\Program Files\Microsoft Content Management Server\Docs\MCMS2002.chm)