Copied to clipboard

Flag this post as spam?

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


  • Mehul Gajjar 48 posts 172 karma points
    Apr 21, 2015 @ 10:17
    Mehul Gajjar
    0

    Unable to get value of parent property using Ditto

    Hi, 

    Currently i am using umbraco 7.2.4 and Ditto 

    Ditto is working fine, but I am amble to get value of parental property, kindly see below

    See below snap of my debug code

     

    can some one help on this.

    Thanks in advance

    Regards,

    Mehul Gajjar.

     

     

     

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Apr 21, 2015 @ 10:36
    Hendy Racher
    103

    Hi Mehul,

    On your model, you can use an attribute to indicate to Ditto that it should use an inherited value if it can't find a populated current value:

    using Our.Umbraco.Ditto;
    // 1st param: the property name
    // 2nd param: an alternate property name if 1st isn't available
    // 3rd param: bool flag to indicate if the value should be found recursivily
    [UmbraocProperty("PageTitle", "", true)]
    public string PageTitle { get; set; }

    HTH,

    Hendy

  • Mehul Gajjar 48 posts 172 karma points
    Apr 21, 2015 @ 11:15
    Mehul Gajjar
    1

    Hi Hendy,

    Thanks for reply its works for now. 

    Thanks

    Mehul Gajjar

Please Sign in or register to post replies

Write your reply to:

Draft