Copied to clipboard

Flag this post as spam?

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


  • Manasa 80 posts 201 karma points
    Apr 10, 2014 @ 12:39
    Manasa
    0

    retrieving properties

    Hi,

    How to avoid fetching inherited properties and just retrieve properties(unique properties) created for a particular node?

    Please help.

    Thanks

    Manasa

  • Shaun 248 posts 475 karma points
    Apr 15, 2014 @ 15:18
    Shaun
    0

    It depends how you're accessing the nodes. Is this using mvc? or razor? In which case you can use something like

    var myNode = Umbraco.TypedContent(idOfNode);
    string strPropertyofNode = myNode.GetProperty("myProperty").Value;

    But it all depends on how you're working with it really.

  • Charles Afford 1163 posts 1709 karma points
    Apr 18, 2014 @ 19:14
    Charles Afford
    0

    Hi what version of umbraco are you using?  And please tell us if you are using razor?

    Are you in the context of a view (razor) or controller? c#

    For anything version 6+ you want to access the properties on a node through IPublishedContent.

    Charlie. :) 

  • Manasa 80 posts 201 karma points
    Apr 22, 2014 @ 08:29
    Manasa
    0

    Hi,

    I'm using C# . It's a .Net user control. Version 6.1.6

    Manasa

Please Sign in or register to post replies

Write your reply to:

Draft