Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andreas Pfanner 196 posts 314 karma points
    Dec 29, 2010 @ 16:53
    Andreas Pfanner
    0

    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

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 29, 2010 @ 17:21
    Jan Skovgaard
    0

    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

  • Kim Andersen 1447 posts 2196 karma points MVP
    Dec 29, 2010 @ 17:29
    Kim Andersen
    0

    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

  • Andreas Pfanner 196 posts 314 karma points
    Dec 30, 2010 @ 09:29
    Andreas Pfanner
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft