Copied to clipboard

Flag this post as spam?

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


  • Chris Larson 48 posts 63 karma points
    Jul 07, 2009 @ 17:06
    Chris Larson
    0

    Inheritance in Document Types

    Is there a way in Umbraco to have a child document type inherit the values in a parent document type and pass those through without using a macro to manipulate the data?

    The admin tree has a structure as noted below:

    +Document Types
        + Parent Doc Type
              - Child Doc Type

    The Content tree has a similar structure as noted below:

    + Content
        + Parent Doc
              - Child Doc

    When the child doc in the content tree is edited, the properties of the Parent Doc are required as well, which is a great feature. However, the values from the parent document are not passed through to the child document. I can do this with a macro, but is there any other way to get that data to pass through? If not, is this a feature that anyone else would like to see in a future release?

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jul 07, 2009 @ 18:06
    Douglas Robar
    3

    If you mean that you want to get the parent's value to appear (as in a template) without having to make a macro to do it...

    One the template you want the value to appear on, click the 'insert field value' icon on the toolbar, select the field you want, and click the RECURSIVE checkbox.

    The recursive flag will make umbraco look up the content tree from child to parent doc until it finds a value for the requested field. This works even if the field you want only exists on the parent docType.

     

    cheers,
    doug.

  • Chris Larson 48 posts 63 karma points
    Jul 07, 2009 @ 18:07
    Chris Larson
    0

    You are the bestest! Thanks Doug!

Please Sign in or register to post replies

Write your reply to:

Draft