Copied to clipboard

Flag this post as spam?

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


  • Sean Parsons 23 posts 38 karma points
    Sep 24, 2009 @ 22:25
    Sean Parsons
    1

    Beginner Document Type Question - easy karma...

    Hi,

    I was just wondering what the uses/advantages/restrictions are for nesting document types.

    I see that there is a 'Master Document Type' drop-down to select from when creating a new document type, but I'm a bit unsure of what it's useful for.

    If a master is selected, does that place any restrictions on using that document type in any templates?

    Thanks,
    Sean

  • Brian Scott 21 posts 41 karma points
    Sep 24, 2009 @ 22:45
    Brian Scott
    1

    Master document types mean that within the document type tree you can associate your new doument type as a child of the master type.

    What this gives you in practice is a means to declare your common page properties in one single document type and then have those display in the editor for all pages of that document type or the child document types. It basically provides you with a single point to update / add page properties for the most common elements of your site.

    If you understand the master templates system there are some similiarties between the template markup inheritance and using this for document type property inheritance.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 24, 2009 @ 23:02
    Dirk De Grave
    0

    Sean,

    Some examples of master document type properties could be: Hide in navigation, hide from search results, url alias, url redirect, meta data, meta keywords, page title. 

     

    Hope this helps.

     

    Regards,

    /Dirk

  • bob baty-barr 1180 posts 1294 karma points MVP
    Sep 25, 2009 @ 04:00
    bob baty-barr
    2

    to build off of what dirk has mentioned above... i often start with a mater docType that has tabs for navigation parameters [like urlAlias umbracoRedirect, umbracoNaviHide, plus others], a SEO tab, and sometimes i even throw a base content tab on their with pageHeading and bodyText...

    using this as a master keeps me from having to add docType tabs and properties to EVERY doctype...

    so if i create a docType for newsItem for example... i have it inherit from the masterDoc and simply have a tab for newsData on the newsItem docType that contains newsDate[datePicker] || newsImage [upload or mediaPicker] || newsDocument [upload or mediaPicker] and maybe even a newsLink [text field]

    this way i only have to create one tab and 4 properties... instead of 3-4 tabs... just speeds up dev and deploy phases...

    hope this is helpful to you.

  • Lee 1130 posts 3088 karma points
    Sep 25, 2009 @ 07:32
    Lee
    0

    I love this place... Something so obvious, that I have been dumb enough to miss!  Good question and good answers - Thanks

  • Jannik Nilsson 38 posts 81 karma points
    Sep 25, 2009 @ 08:54
    Jannik Nilsson
    0

    While this is an awesome feature indeed, it does require a bit of care when used.

    Once a document type has been created there are no easy way to have it inherit from a master type, a feature I'd like to see would be an inheritance field where you could insert/remove doctypes that the document shoud inherit from. That would make it much simpler to adjust the site as it was developed.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Sep 25, 2009 @ 11:03
    Douglas Robar
    1

    For what it's worth, I don't use master docTypes for exactly the reasons Jannik mentioned, plus a few other minor items like dififculty packaging up docTypes that use master docTypes. I'm also kind of picky about what fields appear in a docType and find that not every one needs meta data or even umbracoNaviHide settings. I like to make docTypes that are absolutely specific to its use and needs.

    But I'm also insterested in making sites as quickly and consistently as possible. So...

    I create a base docType with all the properties and tabs that everyone puts on their master docType. I also add a content tab with a bodyText property. Then I right-click > copy that base docType for all my new docTypes and simply delete any fields that aren't necessary. It's much faster to click the X a few times than to create new properties.

    I can also export the base docType and import it to a new site with a few clicks.

    In practice I've found this to be a better solution for me than using master docTypes, but everyone has their own workflow and opinion on these matters... isn't it great that umbraco supports each of us in the way that we work best!

    cheers,
    doug.

Please Sign in or register to post replies

Write your reply to:

Draft