Not sure if these methods still work with the latest version of Umbraco, but with 4.7.1 and DynamicNode following methods are used:
@Model.AncestorOrSelf(string nodeTypeAlias) @Model.AncestorOrSelf(int level) @Model.AncestorOrSelf(Func<DynamicNode, bool> func)
and those auxiliary functions:
@Model.IsDescendant(DynamicNode[,valueIfTrue][,valueIfFalse]) @Model.IsDescendantOrSelf(DynamicNode[,valueIfTrue][,valueIfFalse])
source share