1

I am working on a custom content type and I have a little bit of confusion over how the Inherits attribute of the ContentType element works. I had read in their documentation that:

If Inherits is FALSE or absent and the parent content type is a built-in type, the child content type inherits only the fields that were in the parent content type when SharePoint Foundation was installed. The child content type does not have any fields that users have added to the parent content type.

So I created a custom content type that inherited from the Article Page content type. Here is the abreviated XML:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <!-- Parent ContentType: Article Page (0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D) -->
  <ContentType ID="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D00686902dceda048e5b29bda9e09cd73fd"
               Name="MNC Base Page Layout"
               Inherits="FALSE"
               . . .

But when I deployed the content type and looked at it in my Site Settings it only had the columns that I had explicitly defined and none of the columns from Article Page. Based on the first sentence of the documentation above shouldn't all the columns from Article Page be included?

5
  • 1
    I'm not too familiar with Content Types from a development perspective, but the description you've quoted sounds the opposite of what you would expect. If inherits = false, then it shouldn't inherit properties. If it's true, then it should. I don't know for sure but I know what the dictionary says about the word inherit.
    – shufler
    Commented Nov 17, 2011 at 18:13
  • This is expected behaviour, as described on MSDN.
    – James Love
    Commented Nov 17, 2011 at 18:45
  • Inherits=TRUE, inherit the columns, Inherits=FALSE, no column inheritance.
    – James Love
    Commented Nov 17, 2011 at 18:45
  • @JamesLove, that would make sense but in the MSDN documentation I posted it says that both TRUE and FALSE should inherit. They just inherit a different set of columns. Is the documentation wrong? If not, is my assumption that "Article Page" is a built in content type incorrect? Commented Nov 17, 2011 at 18:49
  • 1
    See the answer from, er... 'default'. Built-in CTs are SP Foundation ones, Article is from SP Server thus not a Foundation CT, so it'll never inherit the columns.
    – James Love
    Commented Nov 17, 2011 at 18:55

2 Answers 2

4

Built In Content Types are defined by MS and are installed with SharePoint. Thus, they are Foundation types. You can see a list of them here - http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spbuiltincontenttypeid_fields.aspx

Cause you inherit from Article Page, that's a part of SharePoint Server, your parent content type, that defines all fields is determine as user type (installed by publishing feature) and thus no fields are provisioned, and base built in content type is document. Please see for details - http://blog.mastykarz.nl/content-type-doesnt-inherit-columns-parent-content-type-publishing-tip-1/

You can just inherit from more parent type(Publishing Page) and specify in page layout only fields that you require.

0
1

The documentation does include:

If Inherits is FALSE or absent and the parent content type was provisioned by a sandboxed solution, the child does not inherit any fields from the parent.

Take a look at my blog post for more information

Custom Content Types and Inherits in SharePoint 2010

1
  • But isn't "Article Page" a built in type? Can built in types be sandboxed solutions? Commented Nov 17, 2011 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.