All of these extension methods are available on Umbraco.Core.Models.IPublishedContent so you can have strongly typed access to all of them with intellisense for both content and media. The following methods return IEnumerable<IPublishedContent>
Children() // this is the same as using the Children property on the content item.Ancestors()Ancestors(int level)Ancestors(string nodeTypeAlias)AncestorsOrSelf()AncestorsOrSelf(int level)AncestorsOrSelf(string nodeTypeAlias)Descendants()Descendants(int level)Descendants(string nodeTypeAlias)DescendantsOrSelf()DescendantsOrSelf(int level)DescendantsOrSelf(string nodeTypeAlias)Siblings()SiblingsAndSelf()
Additionally there are other methods that will return a single IPublishedContent
With the strongly typed IPublishedContent you can do complex queries.
// This example gets the top level ancestor for the current node, and then gets// the first node found that contains "1173" in the array of comma delimited// values found in a property called 'selectedNodes'.var result =@Model.Ancestors().OrderBy(x =>x.Level) .Single() .Descendants() .FirstOrDefault(x =>x.GetPropertyValue("selectedNodes","").Split(',').Contains("1173"));