Using Master Document Type In Umbraco

If you are new to Umbraco, you might have missed this great little feature when creating Document Types – Instead of creating a Document Type and then having to remember and input the same properties over and over again, or copying an existing DocType and then having to go back and remove properties, allowed temples etc..  You can make use of the Master Document Type, this is the same concept as using the Master Pages in ASP.NET where you can create a ‘template’ which all the other DocType’s inherit if you want them too.

I use this when building my sites from the ground up, but the only problem with using this feature if you are creating a package – For some reason it isn’t exported with your package.  But even still, from ground up builds I find this a good productivity aid.

I’ll run you through how I use the Master Document Type and what properties I put in it – So to create a Master Doc Type you just need to create a DocType as shown below (I call mine Master) and un-tick create matching template [more]

one

Now open up your newly created DocType and go to the Generic Properties tab, and we’ll add the following properties to be shown under the ‘Generic Properties’ tab

 two

NOTE: The reason I have hyperlinked the alias’s is so you can get an idea of what they do, also I copy and paste the descriptions from the WIKI into the description fields in the properties just for reference ;)

Now go to the ‘tabs’ tab and create a new tab called ‘Meta’ (This is something that is also done in Warrens CWS) – And go back to the ‘Generic Properties Tab’ now add three more properties like so.

TIP: When creating the Meta tab enter 999 in the sort order - this is so it doesn't appear as the first tab in your child pages when you create them

three

  • alias: metaDescription  Type: Textbox multiple
  • alias: metaKeywords Type: Textbox multiple
  • alias: pageTitle  Type: Textstring

I think the reason for adding these is fairly obvious, but at least each page can now have a unique Page Title & Meta Description – Both are very important if you are implementing an SEO strategy.

1 comment for “Using Master Document Type In Umbraco”

  1. Gravatar of Petr SnobeltPetr Snobelt
    Posted Friday, December 04, 2009 at 12:36:41 PM

    Maybe you can add export of masterDocument to download to article.

    I usually dont offer all these options to editors, they tend to try what they do...

Post a comment