Copied to clipboard

Flag this post as spam?

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


  • Alex 21 posts 41 karma points
    Aug 16, 2010 @ 11:18
    Alex
    0

    Preventing property inheritance in document type

    I have a parent document type called __Affiliates which I'm effectively using as a holding folder for a child document type called Affiliate. I've defined a number of different properties on this Affiliate type which are working fine. I've also created a property on the __Affiliates parent, called DefaultTelephone. Unfortunately when I create content of type Affiliate it seems the DefaultTelephone property is inherited from the parent document type. How can I prevent this inheritance?

  • Arjan H. 160 posts 315 karma points
    Aug 16, 2010 @ 11:50
    Arjan H.
    0

    The master-relationship in document types is used for property inheritance, not necessarily for parent/child relationship. So if you want your Affiliate document type not to inherit the properties from the __Affiliates document type, don't set the master-relationship when creating the Affiliate document type.

  • Sascha Wolter 615 posts 1101 karma points
    Aug 16, 2010 @ 11:54
    Sascha Wolter
    0

    Hi Alex,

    the whole point of the child doc types is so that they inherit the properties of the parent. E.g. I have a 'standard text page' doc type, which contains title, introduction and body text, with a child 'event' that contains start and end dates for the event in addition to getting the inherited properties title, introduction and body text. So the hierarchy of the doc types actually defines inheritance rather than orders the types. There is no way to my knowledge to supress this behaviour and actually you shouldn't.

    In your case the __Affiliates folder should not be having the Affiliate type as child, they should be on the same level. It is however definitely a good idea to create a type __Affiliates so you can dictate the structure, e.g. Affiliate types are only allowed under a node of type __Affiliates.

    Hope that helps,
    Sascha

  • Alex 21 posts 41 karma points
    Aug 16, 2010 @ 11:56
    Alex
    0

    Do you mean disable the 'Allowed child nodetypes' checkbox in the parent document type? I want the content of type Affiliate to be nested under the __Affiliates node in the Content area. Is this not possible?

  • Arjan H. 160 posts 315 karma points
    Aug 16, 2010 @ 12:00
    Arjan H.
    0

    No, you should set the parent/child relationship in the Structure tab, so allowing Affiliate as a child on the __Affiliates doctype. Just don't select __Affiliates as the master doctype when creating the Affiliate doctype, because if you set a master doctype the new doctype will inherit all properties from the master doctype.

  • Alex 21 posts 41 karma points
    Aug 16, 2010 @ 12:35
    Alex
    0

    Superb, thank you! All makes sense now!

Please Sign in or register to post replies

Write your reply to:

Draft