Revision #4

You are currently reviewing an older revision of this page.
Go to current version


With the introduction of SharePoint 2010 there were some changes in terms of Object Model and Structure of Master Pages and Page Layouts derived from the introduction of the Ribbon and introduction of new methods.

The cost of creating a project from scratch is enormous and we must not forget that not all our customers will adopt or take in the short term in their 2010 version Entities.

The aim of this paper is the conversion of a publishing project created in Visual Studio 2008 using 99% of existing code, implementation of new Master Pages and Page Layouts Amendment of existing. 


1. Mount a VM with SharePoint 2010, install Visual Studio 2010 and install the 1.4 BETA WSPBuilder Extensions 2010.
2. Convert the Project to 2010 version. The first task in our TaskList is the conversion of the Project


Remove the DLL's version 12
Delete the DLL's version 12 and add the same for version 14


Change Platform and Framework Version. After removing the corresponding DLL's, let's move our project to the x64 platform and change the version of the Framework on all projects for the minimum version 3.5



 Check that the methods that were "obsolete" and "Deprecated"

Let's compile our project and follow all warnings and errors that Visual Studio 2010 will give us, such as:

"Microsoft.SharePoint.Publishing.PublishingWeb.InheritGlobalNavigation' is obsolete: 'UsePublishingWeb.Navigation.InheritGlobal instead."  
"Microsoft.SharePoint.Publishing.PublishingWeb.IncludePagesInNavigation' is obsolete: 'UsePublishingWeb.Navigation.GlobalIncludePages / CurrentIncludePages instead. "
We have to change all the signs that we are being given as Obsolete and Deprecated methods will generate errors in SharePoint. Change to eliminate all possible errors and be with a Visual Studio project clean

Mandatory change of Features (Content Types), TAG's XML

There is a mandatory tag for the new Content Types Inherits = TRUE or FALSE, the value of this attribute determines whether the content type inherits fields of its parent content type when it is created. If inherits is TRUE, the child content type inherits all the fields that are in the parent, including the fields that users have added.

Inherits="TRUE" >

7. Change in Master Pages

This is undoubtedly a fundamental change, because we will have to radically change our HTML, I suggest downloading the Starter Master Pages for SharePoint 2010 and fit our controls or custom HTML. In this case we use the type page publishing.

a. Remove the Ribbon when the user does not have edit permissions

Search for:

<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle"

Replace with:

div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle" style="display:none">;
<Sharepoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl2"
<script type="text/javascript">
    document.getElementById("s4-ribbonrow").style.display = "block";

Change in Page Layouts
There are also substantial changes in page layouts, we now have a division between the content for readers and content for those users who can change the content.
PublishingWebControls:AuthoringContainer DisplayAudience="ReadersOnly" runat="server">
<!-- Read only user Content -->
<PublishingWebControls:AuthoringContainer DisplayAudience="AuthorsOnly" runat="server">
<PublishingWebControls:EditModePanel runat="server" PageDisplayMode="Display">
<!-- Users with edit permission content -->
<PublishingWebControls:EditModePanel runat="server" PageDisplayMode="Edit">
<!-- Editing content, like content types -->

We note that there is a clear separation of content that users want without permissions to see, but if we want to present the same content for both will have to repeat the HTML.

Revert to this revision