Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Using Nodefactory I can get the current node right?
Node
currentPage = Node.GetCurrent();
and i can even loop through a nodes children,
foreach (Node page incurrentPage.Children )
{
}
but how do I find a nodes ancestor at a specific level?
Hi. Perhaps something like this would work:
var childLevel = 42;var node = Node.GetCurrent();var xpath = string.Format("//*[@isDoc][@id = {0}]//*[@isDoc][@level = {1}]", node.Id, node.Level + childLevel);var nodes = library.GetXmlNodeByXPath(xpath).Cast<IHasXmlNode>() .Select(hasXmlNode => new Node(hasXmlNode.GetNode()));
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Nodefactory Ancestor at Level
Using Nodefactory I can get the current node right?
Node
currentPage = Node.GetCurrent();
and i can even loop through a nodes children,
foreach (Node page incurrentPage.Children )
{
}
but how do I find a nodes ancestor at a specific level?
Hi. Perhaps something like this would work:
is working on a reply...