Copied to clipboard

Flag this post as spam?

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

  • mikkel 143 posts 365 karma points
    Feb 15, 2019 @ 12:48

    how do i make a variabel for a parent and child in one variabel

    Hi i am a litle bit lost here. How can I make a variable that hits 2 different document types that I can then use in one foreach loop ?? I simply can't figure it out :)

    I have try to hit the parent first and then the child of that parent but it dont work

    here is my code

    var selection = Model.Content.Site().Parent<ServiceYdelser>().Children<ServiceYdelse>();
  • Alex Skrypnyk 5747 posts 21807 karma points MVP 4x admin c-trib
    Feb 15, 2019 @ 13:57
    Alex Skrypnyk

    Hi Mikkel

    Do you need a list of all "ServiceYdelser" nodes?


  • mikkel 143 posts 365 karma points
    Feb 15, 2019 @ 15:24

    Hi Alex Yep i need Them all😃 there are only 3

  • Dirk De Grave 4534 posts 5980 karma points MVP 3x admin c-trib
    Feb 15, 2019 @ 14:07
    Dirk De Grave



    returns top most level node in the tree, so not sure why you're adding


    before getting the child nodes?

    Assuming you'd want

Please Sign in or register to post replies

Write your reply to: