Tag Archives: Tony Phillips

Visual Upgrade Grayed out at top level site

All the sites managed the visual upgrade except the top level site. You can run this Powershell script to upgrade all sites in a site collection:

$site = Get-SPSite(“https://webappurl“)

foreach ($web in $site.AllWebs) { $web.UIVersion = 4; $web.Update() }

 

After running this, the top level site was in preview mode with a link in a yellow bar giving the option to upgrade the site. Click on the yellow bar and it will take you to the following page:

https://webappurl/_layouts/prjsetng.aspx

In the Visual Upgrade options, select “

note: 

I think you could probably do this at a top level site by going to https://webappurl/_layouts/prjsetng.aspx and selecting upgrade interface and then the buttons would be ungrayed. Best practice to do a visual upgrade in powershell and loop through all the sites in a site collection.

SharePoint 2010 Centered MasterPages

I spent a lot of time creating centered MasterPages for SharePoint 2010 using Adventure Works and Minimal MasterPages as starting point.

There was a number of issues when using these pages (as starting points). I struggled to get the QuickLaunch to appear on the adventure works MasterPage without distorting the content and also struggled with compatibility with IE7 and other random combinations of browsers. Starting from scratch with the minimal MasterPages creates a huge amount of work rewriting all of the CSS (although this would be the preferred method if I had time!)

In the end I went back and started to make my MasterPage based on the V4 master. Here is how I managed to get it to work by using CSS and very minor changes to the MasterPage itself. I based it around blogs I had read by Randy Drisgill and a few of my own trial and error experiences http://blog.drisgill.com/2010/12/my-real-world-branding-with-sharepoint.html.

I set the class s4-nosetwidth to the workspace div (this stops SharePoint setting the width automatically). We can then wrap our content in a table (single cell) or a div. This will be the container for the page. The reason we dont set a width to the workspace is because this would put the scroll bar in the center of the page.

<div id=”s4-workspace” class=”s4-nosetwidth”>
<table class=”s4-workspace-maintable”>
<tr><td>
<div id=”s4-bodyContainer”>

In the CSS file, you just need to set the width and centering of this table….simple! I have also included a fix for IE7 which crops content. This is a bug found in the standard V4 master. You may still find some issues using IE7 with this MasterPage but much less than using the Adventure works master or using the V4 master with the alternative method of centering.

CSS

/*——————-Browser Fixes ———————*/
/* fixes IE7 cropping*/
.ms-rte-layoutszone-outer
{
float:none!important;
}
/*—————End of Browser Fixes ——————*/

/* —————width and centering——————-*/
.s4-workspace-maintable{
background:white!important;
/*Fixed width*/
width:95%!important;
/* Center the page */
margin: 0 auto!important;
}
/* ———end of width and centering——————*/