Sections
Configuring and customizing sections in Umbraco UI Builder to organize and manage the backoffice interface effectively.
A section in Umbraco represents a distinct area within the backoffice, such as content, media, and so on. Sections are accessible via links in the main menu at the top of the Umbraco interface. Using Umbraco UI Builder, multiple sections can be defined to organize the management of models logically.

Defining a Section
Sections are defined using the AddSection method on the root-level UIBuilderConfigBuilder instance.
Using the AddSection() Method
AddSection() MethodThis method adds a new section to the Umbraco menu with the specified name, allowing custom areas for organizing content in the backoffice.
Method Syntax
AddSection(string name, Lambda sectionConfig = null) : SectionConfigBuilderExample
config.AddSection("Repositories", sectionConfig => {
...
});Using the AddSectionBefore() Method
AddSectionBefore() MethodThis method adds a section before another section with the specified alias, allowing for customized ordering of sections in the backoffice.
Method Syntax
AddSectionBefore(string beforeAlias, string name, Lambda sectionConfig = null) : SectionConfigBuilderExample
config.AddSectionBefore("settings", "Repositories", sectionConfig => {
...
});Using the AddSectionAfter() Method
AddSectionAfter() MethodThis method adds a section after another section with the specified alias, allowing for a custom order of sections in the backoffice.
Method Syntax
AddSectionAfter(string afterAlias, string name, Lambda sectionConfig = null) : SectionConfigBuilderExample
config.AddSectionAfter("media", "Repositories", sectionConfig => {
...
});Customizing the Section Alias
Setting a Custom Alias with SetAlias() Method
SetAlias() MethodThis method sets a custom alias for the section.
Optional: By default, an alias is automatically generated from the section's name. To customize the alias, the SetAlias() method can be used.
Method Syntax
SetAlias(string alias) : SectionConfigBuilderExample
sectionConfig.SetAlias("repositories");Configuring the Section Tree
Using the Tree() Method for Configuration
Tree() Method for ConfigurationThis method configures the tree structure for the section, which is used to organize content types. For more information, see the Trees article.
Method Syntax
Tree(Lambda treeConfig = null) : TreeConfigBuilderExample
sectionConfig.Tree(treeConfig => {
...
});Adding Dashboards to the Section
Adding a Dashboard with the AddDashboard() Method
AddDashboard() MethodThis method adds a dashboard to the section with the specified alias, providing tools and features for content management. For more information, see the Dashboards article.
Method Syntax
AddDashboard(string name, Lambda dashboardConfig = null) : DashboardConfigBuilderExample
sectionConfig.AddDashboard("Team", dashboardConfig => {
...
});Using AddDashboardBefore() to Place a Dashboard
AddDashboardBefore() to Place a DashboardThis method adds a dashboard before another dashboard with the specified alias, allowing custom placement in the section. For more information, see the Dashboards article.
Method Syntax
AddDashboardBefore(string beforeAlias, string name, Lambda dashboardConfig = null) : DashboardConfigBuilderExample
sectionConfig.AddDashboardBefore("contentIntro", "Team", dashboardConfig => {
...
});Using AddDashboardAfter() to Place a Dashboard
AddDashboardAfter() to Place a DashboardThis method adds a dashboard after another dashboard with the specified alias, giving control over dashboard order. For more information, see the Dashboards article.
Method Syntax
AddDashboardAfter(string afterAlias, string name, Lambda dashboardConfig = null) : DashboardConfigBuilderExample
sectionConfig.AddDashboardAfter("contentIntro", "Team", dashboardConfig => {
...
});Extending Existing Sections
You can extend existing sections by adding Umbraco UI Builder trees and dashboards, context apps, and virtual subtrees. This can be done by calling the WithSection method on the root-level UIBuilderConfigBuilder instance.
Extending an Existing Section with WithSection()
WithSection()This method extends an existing section with additional configuration, enabling more customization for existing areas.
Method Syntax
WithSection(string alias, Lambda sectionConfig = null) : WithSectionConfigBuilderExample
config.WithSection("member", withSectionConfig => {
...
});Adding Trees to an Existing Section
Using the AddTree() Method
AddTree() MethodThis method adds a tree to the section, helping to visualize and organize content types. For more information, see the Trees article.
Method Syntax
AddTree(string name, string icon, Lambda treeConfig = null) : TreeConfigBuilderExample
withSectionConfig.AddTree("My Tree", "icon-folder", treeConfig => {
...
});Grouping Trees with AddTree() Method
AddTree() MethodThis method adds a tree within a specified group, improving content organization by grouping related trees together. For more information, see the Trees article.
Method Syntax
AddTree(string groupName, string name, string icon, Lambda treeConfig = null) : TreeConfigBuilderExample
withSectionConfig.AddTree("My Group", "My Tree", "icon-folder", treeConfig => {
...
});Adding a Tree Before or After an Existing Tree
Using AddTreeBefore() to Position a Tree
AddTreeBefore() to Position a TreeThis method adds a tree before another tree within the section, allowing you to customize the tree order. For more information, see the Trees article.
Method Syntax
AddTreeBefore(string treeAlias, string name, string icon, Lambda treeConfig = null) : TreeConfigBuilderExample
withSectionConfig.AddTreeBefore("member", "My Tree", "icon-folder", treeConfig => {
...
});Using AddTreeAfter() to Position a Tree
AddTreeAfter() to Position a TreeThis method adds a tree after another tree within the section, enabling specific ordering of trees. For more information, see the Trees article.
Method Syntax
AddTreeAfter(string treeAlias, string name, string icon, Lambda treeConfig = null) : TreeConfigBuilderExample
withSectionConfig.AddTreeAfter("member", "My Tree", "icon-folder", treeConfig => {
...
});Adding a Dashboard to an Existing Section
Using the AddDashboard() Method
AddDashboard() MethodThis method adds a new dashboard to the section with the specified name. For more information, see the Dashboards article.
Method Syntax
AddDashboard (string name, Lambda dashboardConfig = null) : DashboardConfigBuilderExample
withSectionConfig.AddDashboard("Team", dashboardConfig => {
...
});Using the AddDashboardBefore() Method
AddDashboardBefore() MethodThis method adds a dashboard before the dashboard with the specified alias. For more information, see the Dashboards article.
Method Syntax
AddDashboardBefore (string beforeAlias, string name, Lambda dashboardConfig = null) : DashboardConfigBuilderExample
withSectionConfig.AddDashboardBefore("contentIntro", "Team", dashboardConfig => {
...
});Using the AddDashboardAfter() Method
AddDashboardAfter() MethodThis method adds a dashboard after the dashboard with the specified alias. For more information, see the Dashboards article.
Method Syntax
AddDashboardAfter (string afterAlias, string name, Lambda dashboardConfig = null) : DashboardConfigBuilderExample
withSectionConfig.AddDashboardAfter("contentIntro", "Team", dashboardConfig => {
...
});Last updated
Was this helpful?