Skip to main content

Children

C#
1
2
3
public IReadonlyList<Node> Children(IList<string> entryFields = null, entryLinkDepth = 0, Dictionary<string, int> entryFieldLinkDepths = null) { }
C#
1
2
// Get the child nodes for the current node. IReadonlyList<Node> childNodes = currentNode.Children();

ChildrenAsync

C#
1
2
3
public Task<IReadonlyList<Node>> ChildrenAsync(IList<string> entryFields = null, entryLinkDepth = 0, Dictionary<string, int> entryFieldLinkDepths = null) { }
C#
1
2
// Get the child nodes for the current node. IReadonlyList<Node> childNodes = await currentNode.ChildrenAsync();

Parent

C#
1
2
3
4
public Node Parent(IList<string> entryFields = null, entryLinkDepth = 0, Dictionary<string, int> entryFieldLinkDepths = null) { }
C#
1
2
// Get the child nodes for the current node. Node parentNode = currentNode.Parent();

ParentAsync

C#
1
2
3
public Node ParentAsync(IList<string> entryFields = null, entryLinkDepth = 0, Dictionary<string, int> entryFieldLinkDepths = null) { }
C#
1
2
// Get the parent node for the current node. Node parentNode = await currentNode.ParentAsync();

AncestorAtLevel

C#
1
2
3
public Node AncestorAtLevel(int level, IList<string> entryFields = null, entryLinkDepth = 0, Dictionary<string, int> entryFieldLinkDepths = null) { }
C#
1
2
// Get the ancestor node at level 2 Node ancestorNode = currentNode.AncestorAtLevel(2);

AncestorAtLevelAsync

C#
1
2
3
public async Task<Node> AncestorAtLevelAsync(int level, IList<string> entryFields = null, entryLinkDepth = 0, Dictionary<string, int> entryFieldLinkDepths = null) { }
C#
1
2
// Get the ancestor node at level 2 Node ancestorNode = await currentNode.AncestorAtLevelAsync(2);

Ancestors

C#
1
2
3
public IReadonlyList<Node> Ancestors(int startLevel = 0, IList<string> entryFields = null, entryLinkDepth = 0, Dictionary<string, int> entryFieldLinkDepths = null) { }
C#
1
2
3
4
// Get the ancestors nodes starting at level 2 IReadonlyList<Node> ancestorNodes = currentNode.Ancestors(2); // Create a breadcrumb component from the list...

AncestorsAsync

C#
1
2
3
public async Task<IReadonlyList<Node>> AncestorsAsync(int startLevel = 0, IList<string> entryFields = null, entryLinkDepth = 0, Dictionary<string, int> entryFieldLinkDepths = null) { }
C#
1
2
3
4
// Get the ancestors nodes starting at level 2 IReadonlyList<Node> ancestorNodes = await currentNode.AncestorsAsync(2); // Create a breadcrumb component from the list...

Siblings

C#
1
2
3
public IReadonlyList<Node>> Siblings(IList<string> entryFields = null, entryLinkDepth = 0, Dictionary<string, int> entryFieldLinkDepths = null) { }
C#
1
2
// Get the sibling nodes IReadonlyList<Node> siblingNodes = currentNode.Siblings();

SiblingsAsync

C#
1
2
3
public async Task<IReadonlyList<Node>> SiblingsAsync(IList<string> entryFields = null, entryLinkDepth = 0, Dictionary<string, int> entryFieldLinkDepths = null) { }
C#
1
2
// Get the siblings nodes IReadonlyList<Node> siblingNodes = await currentNode.SiblingsAsync();

Entry

C#
1
2
3
public Entry Entry() { }
C#
1
2
// Get the associated entry Entry entry = currentNode.Entry();

EntryAsync

C#
1
2
3
public async Task<Entry> Entry() { }
C#
1
2
// Get the associated entry only including the fields I want Entry movie = await currentNode.EntryAsync();

Entry<T>

C#
1
2
3
public T Entry<T>() { }
C#
1
2
3
4
5
6
7
8
9
10
11
12
public class Movie: EntryModel { public string Title { get; set; } public string Synopsis { get; set; } public int ReleaseYear { get; set; } } // Get the associated entry only including the fields I want Movie movie = currentNode.Entry<Movie>();

EntryAsync<T>

C#
1
2
3
public async Task<T> Entry<T>() { }
C#
1
2
3
4
5
6
7
8
9
10
11
12
public class Movie: EntryModel { public string Title { get; set; } public string Synopsis { get; set; } public int ReleaseYear { get; set; } } // Get the associated entry only including the fields I want Movie movie = await currentNode.EntryAsync<Movie>();

Still need help?

New support request