Deploying Publishing Content Types via Site Definition

First let me say welcome to my blog!

Recently I’ve been working on a project that involved some heavy branding of a custom publishing site.

I had to create the following custom items:

  • Publishing Site Definitions
  • Master Pages
  • Site Columns
  • Content Types (Using the custom site columns)
  • Page Layouts (Using the custom content types)
  • Images
  • CSS Files

All of this had to be deployable via features and solutions.

To accomplish this I created some custom site definitions and deployed the necessary branding files via a feature that was attached to the site definition. However, when my site definition was created my custom content types were not attached to the pages library resulting in a page that correctly used my page layout but was lacking the support fields behind the scenes.

To remedy this I had to create an additional feature which I called my ContentTypeBindingFeature and attached it to my site definition. This solved my problem.

Example code below:


<?xml version="1.0" encoding="utf-8" ?>
Title="Content Type Binder"
Description="Binds a specified content type to the pages library"
<elementmanifest location="ContentTypeBinding.xml">


<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="">
<ContentTypeBinding ContentTypeId="INSERT_YOUR_CONTENT_TYPE_ID" ListUrl="Pages" />
I'm a public speaker and the Chief SharePoint Architect for Eastridge, a Microsoft Gold Partner specializing in SharePoint and custom application development in Winston-Salem, NC. I focus on the SharePoint platform with a specialty in Information Architecture, Publishing and Best Practices.

Got something to say? Go for it!