I have a general question to content type architecture in Umbraco.
- I have created a master content type which defines a "Meta" tab to hold meta information properties ( = every page will need that). All of my other content types will use this as master type.
-- I have a Homepage content type which contains Site title, Main content and Side content
-- I have a Textpage content type which contains Main content, Side content
To avoid redundancy between Homepage and Textpage, would it be better to have the following structure:
- Master type
-- Textpage
---- Homepage
So Homepage will inherit the content fields from Textpage and don't have to define it itself. It just adds its specific properties. Is that a good idea / way to go?
If you are certain that you'll not need to add anything else on the Textpage, which may not be relevant to have on the Homepage later on I think this approach makes sense.
I think it always depends on the situation. Sometimes You'll need to accept some redundancy and other times the approach above makes perfect sense. That is what is so nice about the flexibility in Umbraco :-)
I the example that you talks about you could go for a structure where you let Homepage inherit from Textpage, because you only have two properties on the textpage. But in most cases there's more that only one field in difference between a textpage and the homepage document type. At least that's my experience.
Everytime you are working with inheritance of document types, you have to remember what will happen if one of the document types suddenly needs an extra field or two. Let's say that in a month the textpage needs to be extended with two additional fields. Then it might not be that great if the homepage inherits from textpage anymore. So to be true, I think I would stick to the solution you already have got. I'd do that because we're only talking about two document types, and they have just got a couple of fields each, so you only need to create two redundant fields at the moment. If you had ten document types, that had five similar fields, then it would be another situation.
I decided to keep the document types separated in order to get more flexibility for future, since I don't know yet how they will be extended, and redundancy is actually minimal.
Content type architecture
Hello,
I have a general question to content type architecture in Umbraco.
- I have created a master content type which defines a "Meta" tab to hold meta information properties ( = every page will need that). All of my other content types will use this as master type.
-- I have a Homepage content type which contains Site title, Main content and Side content
-- I have a Textpage content type which contains Main content, Side content
To avoid redundancy between Homepage and Textpage, would it be better to have the following structure:
- Master type
-- Textpage
---- Homepage
So Homepage will inherit the content fields from Textpage and don't have to define it itself. It just adds its specific properties.
Is that a good idea / way to go?
Thanks for any suggestions,
Andreas
Hi Andreas
If you are certain that you'll not need to add anything else on the Textpage, which may not be relevant to have on the Homepage later on I think this approach makes sense.
I think it always depends on the situation. Sometimes You'll need to accept some redundancy and other times the approach above makes perfect sense. That is what is so nice about the flexibility in Umbraco :-)
/Jan
Hi Andreas.
I the example that you talks about you could go for a structure where you let Homepage inherit from Textpage, because you only have two properties on the textpage. But in most cases there's more that only one field in difference between a textpage and the homepage document type. At least that's my experience.
Everytime you are working with inheritance of document types, you have to remember what will happen if one of the document types suddenly needs an extra field or two. Let's say that in a month the textpage needs to be extended with two additional fields. Then it might not be that great if the homepage inherits from textpage anymore. So to be true, I think I would stick to the solution you already have got. I'd do that because we're only talking about two document types, and they have just got a couple of fields each, so you only need to create two redundant fields at the moment. If you had ten document types, that had five similar fields, then it would be another situation.
Just my five cents :)
/Kim A
Hello,
thank you both for your opinions.
I decided to keep the document types separated in order to get more flexibility for future, since I don't know yet how they will be extended, and redundancy is actually minimal.
Best Regards
Andreas
is working on a reply...