// Get the ancestors nodes starting at level 2
IReadonlyList<Node> ancestorNodes = currentNode.Ancestors(2);
// Create a breadcrumb component from the list...
// Get the ancestors nodes starting at level 2
IReadonlyList<Node> ancestorNodes = await currentNode.AncestorsAsync(2);
// Create a breadcrumb component from the list...
// 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>();