How can I make a document type get inherited by other document types?
Hello!
In Umbraco, I see on some of our document types that settings are inherited from other document types elsewhere under the "Document Types" tree. For example under "Document Types -> Common -> Compositions", I see a "Grid Content" type that is inherited by document types in other folders. I created a new type called "Project Information" under "Document Types -> Common -> Compositions". How can I make this document type get inherited by other types just like the "Grid Content" type is inherited by other types?
I've tried to illustrate it with a few screenshots.
When editing a document type, you can click the Composition link, which in return will open a new panel where you can select one or more other document types that should be used for composition/inheritance.
The examples below are based on the default starter kit, that ships with Umbraco. Here is a document type called Blog, for which Content Base and Navigation Base are used as compositions. Blog will then inherit tabs and properties from both these document types.
Awesome! This works for some of our types. For others, I see the message: "This content type is used in a composition, and therefore cannot be composed itself." Is there a way around this?
I think this is because that document type has a child document type - in which case you won't be able to add a composition.
For instance in my test solution, I've created a Hest document type, along with a child document type called Test. You won't be able to add any compositions to Hest, but you will be able to add compositions for Test.
You could think of it as something that only available for leaf document types.
This type has properties that it says are inherited from other compositions. I guess that it was possible to do that because the types under this one were created after this one.
How can I make a document type get inherited by other document types?
Hello!
In Umbraco, I see on some of our document types that settings are inherited from other document types elsewhere under the "Document Types" tree. For example under "Document Types -> Common -> Compositions", I see a "Grid Content" type that is inherited by document types in other folders. I created a new type called "Project Information" under "Document Types -> Common -> Compositions". How can I make this document type get inherited by other types just like the "Grid Content" type is inherited by other types?
Thanks in advance!
Jeremy
Hi Jeremy,
I've tried to illustrate it with a few screenshots.
When editing a document type, you can click the Composition link, which in return will open a new panel where you can select one or more other document types that should be used for composition/inheritance.
The examples below are based on the default starter kit, that ships with Umbraco. Here is a document type called Blog, for which Content Base and Navigation Base are used as compositions. Blog will then inherit tabs and properties from both these document types.
Hope that answers your question ;)
Awesome! This works for some of our types. For others, I see the message: "This content type is used in a composition, and therefore cannot be composed itself." Is there a way around this?
Thanks!
I think this is because that document type has a child document type - in which case you won't be able to add a composition.
For instance in my test solution, I've created a Hest document type, along with a child document type called Test. You won't be able to add any compositions to Hest, but you will be able to add compositions for Test.
You could think of it as something that only available for leaf document types.
Okay, that makes sense.
This type has properties that it says are inherited from other compositions. I guess that it was possible to do that because the types under this one were created after this one.
Is that probably correct?
is working on a reply...