Copied to clipboard

Flag this post as spam?

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


  • Niels Lynggaard 190 posts 548 karma points
    Jun 09, 2022 @ 07:16
    Niels Lynggaard
    0

    Retrieve references to a content node

    Hi all.

    I'm wondering how I can retrieve references to a content node in Umbraco 9. The references are tracked, i can see that on the info-tab but how can these references be retrieved in code?

    Cheers, Niels

  • Niels Lynggaard 190 posts 548 karma points
    Jun 17, 2022 @ 11:13
    Niels Lynggaard
    1
     var nodeRelations = _relationService.GetByChildId(content.Id);//this node is the "child" in the relation
                var relevantRelations = nodeRelations.Where(x => x.RelationTypeId == 5); //"normal related document"
    
  • Paria Shiri 36 posts 109 karma points
    Jan 31, 2024 @ 10:26
    Paria Shiri
    0

    Thanks, I used that.

Please Sign in or register to post replies

Write your reply to:

Draft