A tree is a hierarchical structure that organizes sections into sub-sections. It appears in the main side panel of the Umbraco interface. In Umbraco UI Builder, each section can only have one tree definition, but you can use folder nodes to organize the tree.
Configuring a Umbraco UI Builder Section Tree
The tree configuration for Umbraco UI Builder sections is part of the Section config builder and is accessed via its Tree method.
Using the Tree() Method
This method defines the structure and behavior of a tree within a section.
This method adds a collection to the current tree or group, specifying its names, descriptions, and default icons. The ID property must be defined. For more details, see the Collections article.
treeConfig.AddCollection<Person>(
p => p.Id,
"Person",
"People",
"A collection of people",
collectionConfig => {
...
}
);
Using the AddCollection<>() Method with Icons
This method adds a collection to the current tree or group, specifying its names, descriptions, and custom icons. The ID property must be defined. For more details, see the Collections article.
Adding a Context App Before or After Another Context App
Using the AddContextApp() Method Before Another Context App
This method adds a context app with the specified name and default icon before the specified context app alias. For more information, see the Context Apps article.
Using the AddContextApp() Method with Custom Icon Before Another Context App
This method adds a context app with the specified name and custom icon before the specified context app alias. For more information, see the Context Apps article.
Using the AddContextApp() Method After Another Context App
This method adds a context app with the specified name and default icon after the specified context app alias. For more information, see the Context Apps article.
Using the AddContextApp() Method with Custom Icon After Another Context App
This method adds a context app with the specified name and custom icon after the specified context app alias. For more information, see the Context Apps article.