Posts Tagged “page layout”

SharePoint 2010 – Setting DefaultPageLayout Programmatically

July 1 2010 28 comments

PublishingWeb has a DefaultPageLayout-property which contains information of the page layout to use when you select New Page from Site Actions. The property is readonly as you can see from msdn.

However – PublishingWeb has a method SetDefaultPageLayout which gives you the way to change the default page layout programmatically. Definition is found from

Read more »

Single Master Page and Layout Design Techniques

June 18 2010 9 comments

Having a single master page for all your sites gives you some remarkable benefits. The same master page can also be applied to a system master page in order to give your customer the ultimate branding experience. This, however can lead to a few problems regarding how the system page layouts behave with your public facing master page.

The method…

Read more »

Single Page Layout for Several Content Types

April 21 2010 10 comments

Just recently we came across a case where we needed to share a single page layout between three different content types. The visible meta data fields for all three content types were the same, and creating several identical page layouts felt wrong. Fortunately, SharePoint supports the scenario. Less fortunately, the documentation is a little sparse.

For a…

Read more »

Using Event Receiver to Set Default Values for Publishing Pages

March 29 2010 4 comments

While ago I posted something very similar to this. Here

Here’s yet another solution, and way better and faster to implement.
First create web scoped feature, that adds ItemAdded event receiver to Pages library (should’t be a task). In the ItemAdded method, set the default values which are defined in the ContentType, to each field in the…

Read more »