Copied to clipboard

Flag this post as spam?

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


  • MartinB 411 posts 512 karma points
    Apr 15, 2012 @ 17:20
    MartinB
    0

    Document property enheritance

    Hi there

    Something new and akward struck me today. I've used umbraco for 2 years now and i did not know that document properties could be enherited!? Today i spent 2 hours just recreating properties for new document types :(

    Would anyone be so kind to explain how this works? I guess it must be the nextbest thing after being able to copy/import existing properties or how is the general take on this?

    Kind regards!

  • MartinB 411 posts 512 karma points
    Apr 17, 2012 @ 00:10
    MartinB
    0

    No one?

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Apr 17, 2012 @ 02:10
    Tom Fulton
    1

    Hi Martin,

    Yes, you can inherit document type properties by using Master Document Types.  I think it was introduced around v4.5.  

    Basically any document types you create "beneath" a document type will inherit the tabs and properties of the parent document type automatically.  Normally I create a structure like this:

    - Master (contains all the "umbraco"-magic properties ie umbracoUrlName)
    - - Content Pages (contains Meta tab with the meta properties)
    - - - Home
    - - - Standard Content (contains things like page name, headline, etc and maybe body text)
    - - - - Textpage 
    etc

    But obviously you can use whatever structure works for you.  One caveat is that you can't change a document type's Master Type after you create it, so be careful!

    Another thing you might find useful is the DocTypeMixins package, which works sort of like Umbraco 5 where you can "inherit" from multiple doctypes.  With this solution you create a Document Type called SEO, and "apply" it to any document types that should get it.  This is a little more flexible than the built-in inheritance.

    Also found this blog post which you might find useful:  http://www.blogfodder.co.uk/2009/12/3/using-master-document-type-in-umbraco

    HTH,
    Tom 

  • Grant Thomas 291 posts 324 karma points
    Apr 17, 2012 @ 12:15
    Grant Thomas
    0

    Aside from the caveat of unchangeable masters you mention (perhaps a technical limitation, but one I can live with), the areas concerning construction of Document Types in Umbraco 5 (well, even in 4.7.1.1 really) seems to have recieved the love it deserved, making the process just about as awesome as the concept. It would be hard to miss this feature now, and you'd miss it hard if any of it was absent.

    ...in my opinion.

  • MartinB 411 posts 512 karma points
    Apr 23, 2012 @ 10:18
    MartinB
    0

    Hi Tom and Grant

    Thanks a lot for your inputs, the DocType Mixins looks like just the thing for me, although the template structure provided by Tom makes a lot of sense and would also be a great way to go about this.

    Have a great day!

     

Please Sign in or register to post replies

Write your reply to:

Draft