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. |
nodeId | |
System. |
parentId | The parent id for the current node |
System. |
getChildNodesUrl | |
System. |
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. |
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. |
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. |
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. |
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. |
MenuUrl
The JSON URL to load the menu from
Declaration
[DataMember(Name = "menuUrl")]
public string MenuUrl { get; set; }
Property Value
Type | Description |
---|---|
System. |
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. |
ParentId
Declaration
[DataMember(Name = "parentId", IsRequired = true)]
public object ParentId { get; set; }
Property Value
Type | Description |
---|---|
System. |
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. |
Remarks
If this is not set, then the route path will be automatically determined by: {section}/edit/{id}