Skip to main content
9 events
when toggle format what by license comment
Apr 13, 2017 at 12:49 history edited CommunityBot
replaced http://tridion.stackexchange.com/ with https://tridion.stackexchange.com/
Feb 27, 2014 at 9:41 history edited Bart Koopman CC BY-SA 3.0
updated code
Feb 27, 2014 at 8:29 comment added Bart Koopman @JoshHebb as mentioned I didn't test this, but reading the documentation, I was expecting to use the direction Down and reading the first item to get the absolute parent. It might very well be incorrect, but choosing direction Up and reading the last item, sounds like a bit of the same to me. Anyways, its always a smart thing to just write the code and debug it to confirm you get expected results.
Feb 26, 2014 at 17:32 comment added Josh Hebb Hi Bart. I tried out your code as I was looking for a more efficient way of finding the root; I can confirm we need to use the BluePrintChainDirection.Up, as we are scanning upwards in the blueprint towards the root. Also, you grab the first element via 'FirstOrDefault()', however I believe we need to grab the last component in the list as I noticed they are added in descending order. I wasn't sure it would be safe to assume the last element in the list would always be the root, but I think your assumption is correct.
Feb 26, 2014 at 14:41 history edited Bart Koopman CC BY-SA 3.0
added sample on how to actually get the parent Component
Feb 26, 2014 at 14:27 comment added Bart Koopman @premkumarsubramanian I didn't test this, but reading the documentation, down sounded like the thing to go for: Blueprint chain goes down to the bottom-level child item
Feb 26, 2014 at 14:19 comment added premkumar subramanian Shouldn't the Direction be 'BluePrintChainDirection.Up' in this case?
Feb 26, 2014 at 13:32 history edited Bart Koopman CC BY-SA 3.0
completed
Feb 26, 2014 at 13:18 history answered Bart Koopman CC BY-SA 3.0