Copied to clipboard

Flag this post as spam?

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


  • Laurence Gillian 600 posts 1219 karma points
    Feb 22, 2010 @ 17:43
    Laurence Gillian
    0

    Inheritance Issue

    Hi,

    Firstly great package and good implementation. Its simple and I like that. 

    The only issue I've found, is if a standard value is set on a parent document type it is not inherited to its child.

    So below I've outlined a typical scenario.

    All content at 'Level 4, or depth 4' in the site inherits from a parent called 'Public - Level 4', this document type contains what is common for all Level 4 elements. In this case a header, a teaser and some body text. (contentHeader, contentTeaser and contentBody).

    So in the Header field (contentHeader) I enter $name$ and in the Teaser field (contentTeaser) I enter 'Hello World', moving to my content section and creating a new 'L4 - News Article' these values are not passed across. However if I create this data on the document type (not the parent - e.g. 'L4 - News Article') they will be used as expected. 

    Love the package, any idea's why this is happening though? 

    Its the only thing hold me back from using this package as all our new sites now use this structure to keep document types under control ;)

    Thanks again for a ace package, Laurie

    p.s I already owe you a beer, so if you fix this I'll buy you many a beer at CG10! 

  • Laurence Gillian 600 posts 1219 karma points
    Feb 23, 2010 @ 11:16
    Laurence Gillian
    0

    Image showing the doctype setup below;

  • Laurence Gillian 600 posts 1219 karma points
    Feb 23, 2010 @ 11:19
  • Morten Christensen 596 posts 2773 karma points admin hq c-trib
    Feb 23, 2010 @ 21:52
    Morten Christensen
    1

    Hi Laurance,

    Thanks for the bug report.
    I will test it out when I have finished the Google Analytics package, so hopefully some time next week.
    I already have a couple of fixes and additions in place for this Standard Values package, so hopefully I can workout this bug as well.

    - Morten

  • Morten Christensen 596 posts 2773 karma points admin hq c-trib
    Feb 28, 2010 @ 18:33
    Morten Christensen
    1

    Hi Laurance,

    I think I originally misunderstood you post, as I thought it was simply the tabs that weren't showing up. But after looking a bit closer I realized that it was the values you wanted to inheirent from the master document, which makes perfect sense. I hadn't thought of this initially but I have now added it as a feature, so when you create a new Document Type (ie. L2, which inheirent from Meta) the standard values are "copied" from Meta to L2. I also added a button to reload values from master Document Type if you want to do it for existing doctypes.
    Note that values will only be inheirented from master to child if the field is empty on the child element. Thought it made sense in order to not overwrite existing property values on the child element.

    I will post version 1.1 of the package when I have has time to polish it a bit + test it some more.

    Stay tuned ;)

    - Morten

  • Laurence Gillian 600 posts 1219 karma points
    Mar 04, 2010 @ 14:20
    Laurence Gillian
    0

    Fantastic! :) Thank you! Lau

  • Morten Christensen 596 posts 2773 karma points admin hq c-trib
    Mar 07, 2010 @ 20:50
    Morten Christensen
    1

    Hi Laurance,

    Package has been updated with inheritance features.
    When you first take the Standard Values into use, the values from the Master Document Types will be inheriented to child Document Types. You can also reload property values from the Master Document Type (from master to child that is), but please notice that the values from the master will only be copied to the child if the matching property is empty on the child. This is done to ensure that nothing is overwritten on the child Document Type by default.

    But, try it out and let me know if you have any questions.

    - Morten

Please Sign in or register to post replies

Write your reply to:

Draft