Class TreeRootNode
A tree node that represents various types of root nodes
Namespace: Umbraco.Cms.Core.Models.Trees
Assembly: Umbraco.Infrastructure.dll
Syntax
[DataContract(Name = "node", Namespace = "")]
public sealed class TreeRootNode : TreeNode
Remarks
A Tree
This is required to return the tree data for a given section. Some sections may only contain one tree which means it's section root should also display a menu, whereas other sections have multiple trees and the section root shouldn't display a menu.
The root node also contains an explicit collection of children.
Properties
View SourceChildren
The node's children collection
Declaration
[DataMember(Name = "children")]
public TreeNodeCollection Children { get; }
Property Value
Type | Description |
---|---|
Tree |
ContainsGroups
True if this root node contains group root nodes
Declaration
[DataMember(Name = "containsGroups")]
public bool ContainsGroups { get; }
Property Value
Type | Description |
---|---|
System. |
ContainsTrees
Returns true if there are any children
Declaration
[DataMember(Name = "containsTrees")]
public bool ContainsTrees { get; }
Property Value
Type | Description |
---|---|
System. |
Remarks
This is used in the UI to configure a full screen section/app
IsContainer
Will be true if this is a multi-tree section root node (i.e. contains other trees)
Declaration
[DataMember(Name = "isContainer")]
public bool IsContainer { get; }
Property Value
Type | Description |
---|---|
System. |
IsGroup
True if this is a group root node
Declaration
[DataMember(Name = "isGroup")]
public bool IsGroup { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
View SourceCreateGroupedMultiTreeRoot(TreeNodeCollection)
Creates a section root node for grouped multiple trees
Declaration
public static TreeRootNode CreateGroupedMultiTreeRoot(TreeNodeCollection children)
Parameters
Type | Name | Description |
---|---|---|
Tree |
children |
Returns
Type | Description |
---|---|
Tree |
CreateGroupNode(TreeNodeCollection, String)
Creates a group node for grouped multiple trees
Declaration
public static TreeRootNode CreateGroupNode(TreeNodeCollection children, string section)
Parameters
Type | Name | Description |
---|---|---|
Tree |
children | |
System. |
section |
Returns
Type | Description |
---|---|
Tree |
CreateMultiTreeRoot(TreeNodeCollection)
Creates a section root node for non-grouped multiple trees
Declaration
public static TreeRootNode CreateMultiTreeRoot(TreeNodeCollection children)
Parameters
Type | Name | Description |
---|---|---|
Tree |
children |
Returns
Type | Description |
---|---|
Tree |
CreateSingleTreeRoot(String, String, String, String, TreeNodeCollection, Boolean)
Creates a section root node for a section with a single tree
Declaration
public static TreeRootNode CreateSingleTreeRoot(string nodeId, string getChildNodesUrl, string menuUrl, string title, TreeNodeCollection children, bool isSingleNodeTree = false)
Parameters
Type | Name | Description |
---|---|---|
System. |
nodeId | |
System. |
getChildNodesUrl | |
System. |
menuUrl | |
System. |
title | |
Tree |
children | |
System. |
isSingleNodeTree |
Returns
Type | Description |
---|---|
Tree |