A node represents a location within the navigational structure of a website. The linking of nodes as parent-child relationships forms the hierarchical structure of a website, with a node having a single parent and (optionally) multiple child nodes. A single entry can optionally be assigned to a node.
Properties
Name | Type | Description |
---|---|---|
Id | Guid | The node identifier. |
ProjectId | string | The project identifier. |
ParentId | Guid? | The parent node id. The value will be null if the node is the root. |
DisplayName | LocalizedString | The localized node display name. |
Slug | LocalizedString | The localized node slug. |
EntryId | Guid? | (Optional) The associated entry identifier. |
ChildCount | int | The count of child nodes. |
IsCanonical | boolean | A flag to indicate whether the node represents the canonical path for the attached entry. |
IncludeInMenu | boolean | A flag to indicate whether the node is to be included in menus. |
Methods
Method | Returns | Description |
---|---|---|
Save() | void | Saves changes made to the node instance. |
SaveAsync() | Task | Saves changes made to the node instance asynchronously. |
Delete() | void | Deletes the node instance. |
DeleteAsync() | Task | Deletes the node instance instance asynchronously. |
NewChild(LocalizedString displayName) | Node | Creates and returns a new child node by specifying the display name. |
NewChild(LocalizedString displayName, Guid id) | Node | Creates and returns a new child node by specifying the display name and id. |
Children() | List<Node> | Gets the child nodes for the current node. |
ChildrenAsync() | Task<List<Node>> | Gets the child nodes for the current node asynchronously. |
Parent() | Node | Gets the parent node for the current node. |
ParentAsync() | Node | Gets the parent node for the current node asynchronously. |
SetChildNodeOrder() | void | Sets the child node order for the current node. |
SetChildNodeOrderAsync() | Task | Sets the child node order for the current node asynchronously. |
SetChildNodeOrder() | void | Sets the child node order for the current node. |
SetChildNodeOrderAsync() | Task | Sets the child node order for the current node asynchronously. |
DeleteChildNodeOrder() | void | Deletes the child node order for the current node. |
DeleteChildNodeOrderAsync() | Task | Deletes the child node order for the current node asynchronously. |