SP2010 – Now possible to change your page layout on the fly?

Wow, this seems like an interesting and much requested feature I just discovered in SharePoint 2010. It seems you can now change the page layout of an existing page! Maybe this is old news already, but I hadn’t heard anything about it yet.

So we have our regular article page right here:

SP2010 Article Page

SP2010 Article Page

When you expand the Page Layout button on the ribbon, you get this:  

SP2010 Change Page Layout

SP2010 Change Page Layout

 Let’s for example select Blank Web Part page as the new layout for our page. SharePoint then takes the new setting, doesn’t perform a post-back anymore, AJAX is very nicely integrated now:

SP2010 - Changing Page Layout

SP2010 - Changing Page Layout

When SharePoint is done processing the changes, our page is now a web part page instead of the article page it was before!

SP2010 - Web Part Page
SP2010 – Web Part Page

 
Edit:

The functionality isn’t completely bug-free yet. After playing around with a couple of different page layouts, I’m suddenly getting this error:

SP2010 Change Page Layout Error
SP2010 Change Page Layout Error

Obviously the product is still in beta, I’m sure this will be fixed in the final version :)

SP2010 – SPUserCodeV4 – Your new web part project isn’t deploying?

So you’ve just gone through all the trouble to get the new SharePoint 2010 beta installed with the new Visual Studio 2010 beta alongside of it. You’ve created your first web part project and you’re ready to deploy!

Only one minor issue though, when you try to deploy, you’re getting an error, saying that “Cannot start service SPUserCodeV4 on computer <computername>”.

Visual Studio 2010 - SharePoint project deployment error

Visual Studio 2010 - SharePoint project deployment error

Although the screenshot shows an error with retracting, I was getting the same error when deploying. I figured, maybe it works if I deploy it again, but alas :)

The error is related to a service not being started on the SharePoint server. In order to start it, do the following:

- Go to Central Administration -> System Settings -> Manage services on server
- Locate the service “Microsoft SharePoint Foundation User Code Service”

SP2010 User Code Service

SP2010 User Code Service

On my server it wasn’t started by default. I’m not sure if something went wrong during installation and that this service should be enabled by default. Just click the “Start” link button to start the service.

Now go back to Visual Studio 2010 and retry deploying your solution. In my case, this did the trick; the project was deployed successfully deployed!

VS2010 Sharepoint Project Deployed

VS2010 Sharepoint Project Deployed

 
Thinking about it, it might have something to do with the order of installation. I installed Visual Studio 2010 after I installed and configured SharePoint 2010. Maybe for some reason SharePoint only picks this up when it can find a Visual Studio installation or something like that. Not too bothered to find out though, the installation took a few precious hours and I don’t really feel like doing all that again :)