Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
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 Nov 17 '11 at 18:13
    
This is expected behaviour, as described on MSDN. –  James Love Nov 17 '11 at 18:45
    
Inherits=TRUE, inherit the columns, Inherits=FALSE, no column inheritance. –  James Love Nov 17 '11 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? –  Abe Miessler Nov 17 '11 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 Nov 17 '11 at 18:55

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer
    
Just what I was looking for! Thanks! –  Abe Miessler Nov 17 '11 at 18:57

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

share|improve this answer
    
But isn't "Article Page" a built in type? Can built in types be sandboxed solutions? –  Abe Miessler Nov 17 '11 at 18:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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