Converting 2007 branding masterpages to 2010

To start with, you should probably begin with my Upgrading a MOSS 2007 WCM Site to 2010  post.

Once the 2007 content database and site has been restored and upgraded to 2010, go to the Site Settings (e.g.  http://sharepoint2010/_layouts/settings.aspx )

The Settings pages should have the original “2007” look to them.   To upgrade the Settings site to the new 2010 branding, you will need to located the Visual Upgrade feature.

Under Site Collection Administration find and click on Visual Upgrade.  Apply the new User Interface to All Sites (click the Update All Sites button).  Now the Site Settings should have 2010 look

When navigating to the home of and upgraded site an error will likely occur if a custom master page is being used.  Make sure custom errors are turned off (see Seeing Full Error Messages).  Now you will see the real error message which in our case was about not being able to find a certain ContentPlaceHolder in the v4.master.

The site shouldn't be using the v4.master so switching it back to the correct master is the first step.

Go to Site Settings, under Look and Feel select Master Page and then set the Site Master Page to the correct master page (make sure you click the check box for Reset all subsites, unless that shouldn't be done).  At this point you may again encounter errors.

At this point the site should load in a 2007 compatibility mode (no errors should get raised). Some UI elements will look different as new CSS is applied (notably the Site Action button).

Using SharePoint Designer 2010 you will want to create a new version of the master page.

With the site loaded...

Under Add Item select More Pages and create new master page calling it ~old Master Page Name~2010.master.

Delete all content in the new master page and copy the content of the old master page into the new master page.

Load the 2007 master page into an editor (or even Notepad) and copy and paste the contents of the 2007 master into the new 2010 master.

Now some edits of the 2010 master are needed to make it work.

Remove the Register entries for PublishingConsole and PublishingSiteAction.

Don't worry about the reference to the 12 assemblies there is a redirect that binds these to the new version 14.

Now with the Register missing for Site Action we need to remove that from the master page. Find and remove the SharePoint:SPSecurityTrimmedControl  but leave the Content Place Holder.

Next find and remove the Console look for PublishingConsole:Console.

Add reference to a script file in the head just above the CSSLink, <SharePoint:ScriptLink runat="server" Language="javascript" Defer="true" Name="core.js" />

Next we need to add the Ribbon, go grab the v4.master (load it into an editor).

Look for a DIV with ID s4-ribbonrow, select the tag and copy it to the clipboard.

In the new 2010 master page, paste the ribbon right above the container. Additional CSS and tag work needs to be done to pin the ribbon at the top (see Pinning the Ribbon below).

Now we need to switch the master page from the 2007 to the new 2010 version.

Go to Site Settings, Look and Feel, Master Page and switch to the new 2010 master.

Now when we return to the home page an error is raised, MUISelector.

Need to add the Register entry for the MUISelector, find it in the v4.master and add it to the new 2010 master page.

Next we need to remove the Bread Crumb as this is now part of the Ribbon, remove the entire content place holder.

Pinning the Ribbon

The Container needs to be encased in 2 DIVs:

<div id="s4-workspace">

<div id="s4-bodyContainer">

~your content area~

</div>

</div>

NOTE: if you page is fixed width you need to add a class="s4-nosetwidth" to the bodyContainer div element.

Add scroll="no" to the body tag.

Add the following CSS to either a CSS file or directly on the master in the head.

body { overflow: hidden; ... }

That should now pin the Ribbon to the top of the page.

0 Comments


Leave a Comment

Name  
Email (will not be published)    
Comment  
 
Enter both words, separated by a space.