Folders
Configuring folders to organise trees in Umbraco UI Builder.
Folders help organize trees in Umbraco UI Builder, allowing you to structure content with nested folders and collections. A folder can exist within a tree or as a sub-folder within another folder. Folders can contain either sub-folders or Collections.

Defining a Folder
To define a folder, use one of the AddFolder
methods on a Tree
or parent Folder
config builder instance.
Using the AddFolder()
Method
AddFolder()
MethodAdds a folder to the current tree with the specified name and a default folder icon.
Method Syntax
Example
Using the AddFolder()
Method with Custom Icon
AddFolder()
Method with Custom IconAdds a folder to the current tree with a specified name and icon.
Method Syntax
Example
Changing a Folder Alias
When creating a new folder, an alias is automatically generated. However, if you need a specific alias, you can use the SetAlias
method to override it.
Using the SetAlias()
Method
SetAlias()
MethodSets a custom alias for a folder.
Method Syntax
Example
Changing a Folder Icon Color
Using the SetIconColor()
Method
SetIconColor()
MethodSets the folder icon color to the given color. The available colors are: black
, green
, yellow
, orange
, blue
, or red
.
Method Syntax
Example
Adding a Sub-Folder To a Folder
Using the AddFolder()
Method for Sub-Folders
AddFolder()
Method for Sub-FoldersAdds a sub-folder inside the current folder with a specified name and a default folder icon.
Method Syntax
Example
Using the AddFolder()
Method for Sub-Folders with Custom Icon
AddFolder()
Method for Sub-Folders with Custom IconAdds a sub folder to the current folder with a specified name and custom icon.
Method Syntax
Example
Adding a Collection to a Folder
Using the AddCollection<>()
Method
AddCollection<>()
MethodAdds a collection to the current folder with the given names, descriptions, and default icons. The ID property must be defined. For more details, see the Collections article.
Method Syntax
Example
Using the AddCollection<>()
Method with Custom Icons
AddCollection<>()
Method with Custom IconsAdds a collection to the current folder with the given names, description and icons. The ID property must be defined. For more details, see the Collections article.
Method Syntax
Example
Last updated
Was this helpful?