Copied to clipboard

Flag this post as spam?

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


  • K.Garrein 164 posts 629 karma points
    Oct 11, 2016 @ 12:53
    K.Garrein
    0

    How to get the "internal" property from a Related Links property?

    Hey.

    I'm using a Related Links property in my document type. For each related link that is an internal link, there is a property "internal" which contains the internal Id for the link.

    However, I cannot get the value of that property, seemingly because "internal" is also a C# keyword...

    Any ideas on how I can get that value?

    Code example (error):

    @foreach( var rs in relatedSubjects )
    {
        var node = Umbraco.TypedContent( rs.internal );
        <li><a href="#">@( FBD.Tools.GetNodeTitle( node ) )</a></li>
    }
    

    Thank you. Kris.

  • K.Garrein 164 posts 629 karma points
    Oct 11, 2016 @ 12:57
    K.Garrein
    1

    Okay, I found it :-)

    This works:

    var node = Umbraco.TypedContent( rs.Value<int>( "internal" ) );
    

    Kind regards. K.

Please Sign in or register to post replies

Write your reply to:

Draft