Imtech Master Pages and Page Layouts Extension


In the last few posts I wrote about the Visual Studio SharePoint development tools and showed you a few cool things that you can achieve using the extensibility API provided with the tools. The extensions I previously showed you, allowed you to explore SharePoint objects or generate items out of it. But did you know that using the new Visual Studio SharePoint development tools you can also create extensions that will allow you to edit SharePoint objects?

Imtech Master Pages and Page Layouts Extension is an extension for the new Visual Studio SharePoint development tools. Upon installation it adds a new node under the Root Site node called Master Page Gallery.

Master Page Gallery node added by the Imtech Master Pages and Page Layouts Extension

When you first look at it, the Master Page Gallery node looks just like a regular SharePoint Explorer node. It displays objects and allows you to view their properties:

Viewing properties of Master Pages and Page Layouts using the Imtech Master Pages and Page Layouts Extension

However, when you click the right button on a Page Layout or a Master Page the true gem appears.

Imtech Master Pages and Page Layouts Extension allows you not only to view the properties of available Master Pages and Page Layouts but also to do some modifications in their content without even leaving Visual Studio!

Imtech Master Pages and Page Layouts Extension menu items on a Master Page

Editing Page Layouts and Master Pages with the Imtech Master Pages and Page Layouts Extension

Before you start editing a Master Page or a Page Layout you have to check it out:

Checking out a Master Page using the Imtech Master Pages and Page Layout Extension

Checked out Master Pages and Page Layouts are marked with a green icon so that it is easy to see which files are checked out:

Checked out files are marked with a green icon

After checking out the file you can open it using the Open file menu item.

Opening the contents of a Master Page

The contents of the file will appear in Visual Studio, allowing you to view and edit the Master Page or Page Layout that you selected:

Contents of a Master Page opened using the Imtech Master Pages and Page Layouts Extension

If you’ve made any changes the contents of a Master Page or a Page Layout, you can save it using the Save file menu option. The extension will then copy the contents of the active document opened in Visual Studio and save them to the file selected in the SharePoint Explorer.

Saving contents of a file using the Save file menu option

The Imtech Master Pages and Page Layout Extension allows you also to Check In files or Discard the Check out if you don’t want to save any changes:

Discarding Check Out in the SharePoint Explorer

Logging

Everything that the Imtech Master Pages and Page Layouts Extension does is being logged to the output window, so that, in case you get an error, you can track down its cause. The log contains not only error messages but also the complete stack trace making it easier to find the errors:

Output window with an exception message caused by trying to save a file that hasn’t been checked out

Summary

The team responsible for the Visual Studio SharePoint development tools did a great job with providing us with a very flexible and highly extensible set of tools that we can make fit our specific needs. Using both the Visual Studio SharePoint development tools API and the Visual Studio extensibility API you can create some great extensions that will make developing solutions on the SharePoint platform easier and faster.

Imtech Master Pages and Page Layouts Extension has been created to simplify working with Master Pages and Page Layouts. This extension is probably a must have for everyone who works on SharePoint Server 2010 Web Content Management solutions. Using the Imtech Master Pages and Page Layouts Extension you can easily explore available Master Pages and Page Layouts and make simple modifications without even leaving Visual Studio.

Imtech Master Pages and Page Layouts Extension isn’t meant to fully replace SharePoint Designer. Instead it becomes very useful when you want to do some minor changes to your Master Pages and Page Layouts and don’t want to start SharePoint Designer just to do that.

Download: Imtech Master Pages and Page Layouts Extension from Visual Studio Gallery or search for Imtech Master Pages and Page Layouts Extension from the Visual Studio Extensions Manager.

Technorati Tags: SharePoint 2010,Visual Studio 2010

Others found also helpful: