Watch out for ContentTypeBindings

If you don’t know ContentTypeBindings, take a short look at:

“Content type binding enables you to provision a content type on a list defined in the onet.xml schema.”

So we can assign content types to newly created lists. That’s cool 🙂  The ContentTypeBinding feature can, of coarse, contain multiple content types which are bound to multiple lists. Like this:

<Elements xmlns="">
      ListUrl="Pages" />
      ListUrl="Pages" />
      ListUrl="Lists/YourList" />

There is however, a limitation! Do not configure more then one ContentTypeBinding feature for a newly created page! You will get a save conflict Exception, when you provision a new web.

If you are curious how the feature gets referenced, take a look at this page: Understanding Onet.xml files

   <Configuration ID="0" Name="Default">
         <Module Name="Default" />
         <!-- a ContentTypeBinding feature -->
         <Feature ID="6BB8BC13-987F-4668-9A63-E42F1CC03C44" />
         <!-- do NOT add another ContentTypeBinding feature! -->
         <Feature ID="CFAF8323-0CC5-4426-A33D-5B6A0AD72F96" />