Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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?
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
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 126.96.36.199 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.
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!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted