Search Results for

    Show / Hide Table of Contents

    Class TreeRootNode

    A tree node that represents various types of root nodes

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Models.Trees
    Assembly: cs.temp.dll.dll
    Syntax
    public sealed class TreeRootNode : TreeNode
    Remarks

    A TreeRootNode represents: * The root node for a section containing a single tree * The root node for a section containing multiple sub-trees * The root node for a section containing groups of multiple sub-trees * The group node in a section containing groups of multiple sub-trees

    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

    Children

    The node's children collection

    Declaration
    public TreeNodeCollection Children { get; }
    Property Value
    Type Description
    TreeNodeCollection

    ContainsGroups

    True if this root node contains group root nodes

    Declaration
    public bool ContainsGroups { get; }
    Property Value
    Type Description
    System.Boolean

    ContainsTrees

    Returns true if there are any children

    Declaration
    public bool ContainsTrees { get; }
    Property Value
    Type Description
    System.Boolean
    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
    public bool IsContainer { get; }
    Property Value
    Type Description
    System.Boolean

    IsGroup

    True if this is a group root node

    Declaration
    public bool IsGroup { get; }
    Property Value
    Type Description
    System.Boolean

    Methods

    CreateGroupedMultiTreeRoot(TreeNodeCollection)

    Creates a section root node for grouped multiple trees

    Declaration
    public static TreeRootNode CreateGroupedMultiTreeRoot(TreeNodeCollection children)
    Parameters
    Type Name Description
    TreeNodeCollection children
    Returns
    Type Description
    TreeRootNode

    CreateGroupNode(TreeNodeCollection, String)

    Creates a group node for grouped multiple trees

    Declaration
    public static TreeRootNode CreateGroupNode(TreeNodeCollection children, string section)
    Parameters
    Type Name Description
    TreeNodeCollection children
    System.String section
    Returns
    Type Description
    TreeRootNode

    CreateMultiTreeRoot(TreeNodeCollection)

    Creates a section root node for non-grouped multiple trees

    Declaration
    public static TreeRootNode CreateMultiTreeRoot(TreeNodeCollection children)
    Parameters
    Type Name Description
    TreeNodeCollection children
    Returns
    Type Description
    TreeRootNode

    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.String nodeId
    System.String getChildNodesUrl
    System.String menuUrl
    System.String title
    TreeNodeCollection children
    System.Boolean isSingleNodeTree
    Returns
    Type Description
    TreeRootNode
    In This Article
    • Properties
      • Children
      • ContainsGroups
      • ContainsTrees
      • IsContainer
      • IsGroup
    • Methods
      • CreateGroupedMultiTreeRoot(TreeNodeCollection)
      • CreateGroupNode(TreeNodeCollection, String)
      • CreateMultiTreeRoot(TreeNodeCollection)
      • CreateSingleTreeRoot(String, String, String, String, TreeNodeCollection, Boolean)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX