Class TreeNode
Represents a model in the tree
Namespace: Umbraco.Cms.Core.Trees
Assembly: Umbraco.Core.dll
Syntax
[DataContract(Name = "node", Namespace = "")]
public class TreeNode : EntityBasic
Remarks
TreeNode is sealed to prevent developers from adding additional json data to the response
Constructors
View SourceTreeNode(String, String, String, String)
Internal constructor, to create a tree node use the CreateTreeNode methods of the TreeApiController.
Declaration
public TreeNode(string nodeId, string parentId, string getChildNodesUrl, string menuUrl)
Parameters
Type | Name | Description |
---|---|---|
System.String | nodeId | |
System.String | parentId | The parent id for the current node |
System.String | getChildNodesUrl | |
System.String | menuUrl |
Properties
View SourceChildNodesUrl
The JSON URL to load the nodes children
Declaration
[DataMember(Name = "childNodesUrl")]
public string ChildNodesUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CssClasses
A list of additional/custom css classes to assign to the node
Declaration
[DataMember(Name = "cssClasses")]
public IList<string> CssClasses { get; }
Property Value
Type | Description |
---|---|
IList<System.String> |
HasChildren
A flag to set whether or not this node has children
Declaration
[DataMember(Name = "hasChildren")]
public bool HasChildren { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IconFilePath
Returns the icon file path if the icon is not a class, otherwise returns an empty string
Declaration
[DataMember(Name = "iconFilePath")]
public string IconFilePath { get; }
Property Value
Type | Description |
---|---|
System.String |
IconIsClass
Returns true if the icon represents a CSS class instead of a file path
Declaration
[DataMember(Name = "iconIsClass")]
public bool IconIsClass { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
MenuUrl
The JSON URL to load the menu from
Declaration
[DataMember(Name = "menuUrl")]
public string MenuUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String |
NodeType
The tree nodetype which refers to the type of node rendered in the tree
Declaration
[DataMember(Name = "nodeType")]
public string NodeType { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ParentId
Declaration
[DataMember(Name = "parentId", IsRequired = true)]
public object ParentId { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
RoutePath
Optional: The Route path for the editor for this node
Declaration
[DataMember(Name = "routePath")]
public string RoutePath { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
If this is not set, then the route path will be automatically determined by: {section}/edit/{id}