Search Results for

    Show / Hide Table of Contents
    View Source

    Class TreeNode

    Represents a model in the tree

    Inheritance
    System.Object
    EntityBasic
    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 Source

    TreeNode(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 Source

    ChildNodesUrl

    The JSON URL to load the nodes children

    Declaration
    [DataMember(Name = "childNodesUrl")]
    public string ChildNodesUrl { get; set; }
    Property Value
    Type Description
    System.String
    View Source

    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>
    View Source

    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
    View Source

    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
    View Source

    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
    View Source

    MenuUrl

    The JSON URL to load the menu from

    Declaration
    [DataMember(Name = "menuUrl")]
    public string MenuUrl { get; set; }
    Property Value
    Type Description
    System.String
    View Source

    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
    View Source

    ParentId

    Declaration
    [DataMember(Name = "parentId", IsRequired = true)]
    public object ParentId { get; set; }
    Property Value
    Type Description
    System.Object
    View Source

    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}

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • TreeNode(String, String, String, String)
    • Properties
      • ChildNodesUrl
      • CssClasses
      • HasChildren
      • IconFilePath
      • IconIsClass
      • MenuUrl
      • NodeType
      • ParentId
      • RoutePath
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX