Folders
Configuring folders to organise trees in Umbraco UI Builder, the backoffice UI builder for Umbraco.
A folder can appear in either a tree or as a sub folder to other folders. Folders can contain either other (sub)folders or collections.
![](https://docs.umbraco.com/~gitbook/image?url=https%3A%2F%2F2059272600-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fj6FmBruCSGbXJIJB2aRu%252Fuploads%252Fgit-blob-c9956e07e081b5a9d1371ba7b93faba00bf0588d%252Ftree.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=297befdb&sv=1)
Defining a folder
You can define a folder by calling one of the AddFolder
methods on a given Tree
or parent Folder
config builder instance.
AddFolder(string name, Lambda folderConfig = null) : FolderConfigBuilder
Adds a folder to the current tree with the given name and a default folder icon.
AddFolder(string name, string icon, Lambda folderConfig = null) : FolderConfigBuilder
Adds a folder to the current tree with the given name + icon.
Changing a folder alias
SetAlias(string alias) : FolderConfigBuilder
Sets the alias of the folder.
Optional: When creating a new folder, an alias is automatically generated from the supplied name for you. However, if you need a specific alias you can use the SetAlias
method to override this.
Changing a folder icon color
SetIconColor(string color) : FolderConfigBuilder
Sets the folder icon color to the given color. The options that are possible are black
, green
, yellow
, orange
, blue
or red
.
Adding a sub folder to a folder
AddFolder (string name, Lambda folderConfig = null) : FolderConfigBuilder
Adds a sub folder to the current folder with the given name and a default folder icon.
AddFolder (string name, string icon, Lambda folderConfig = null) : FolderConfigBuilder
Adds a sub folder to the current folder with the given name + icon.
Adding a collection to a folder
AddCollection<TEntityType>(Lambda idFieldExpression, string nameSingular, string namePlural, string description, Lambda collectionConfig = null) : CollectionConfigBuilder<TEntityType>
Adds a collection to the current folder with the given names, descriptions, and default icons. An ID property accessor expression is required so that Umbraco UI Builder knows which property is the ID property. For more information check the Collections documentation.
AddCollection<TEntityType>(Lambda idFieldExpression, string nameSingular, string namePlural, string description, string iconSingular, string iconPlural, Lambda collectionConfig = null) : CollectionConfigBuilder<TEntityType>
Adds a collection to the current folder with the given names, description and icons. An ID property accessor expression is required so that Umbraco UI Builder knows which property is the ID property. For more information check the Collections documentation.
Last updated