Chancer
12/12/2023, 4:17 PMcsharp
var example = umbracoContext.Content.GetById(currentNode).AncestorOrSelf(1).Descendants<ExampleType>();
However, if the currentNode is unpublished, it then throws an error as it ofcourse doesnt exist in the PublishedCache.
Would it be correct to assume this would be an instance where I need to retrieve the root node via the ContentService? Or is there another form of service that wouldnt hit the database, but allow me to traverse upwards from this unpublished node.
Thanks!Jemayn
12/12/2023, 4:53 PMChancer
12/12/2023, 5:09 PM