Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Configuring Umbraco UI Builder, the backoffice UI builder for Umbraco.
Choosing an area to connect Umbraco UI Builder, the backoffice UI builder for Umbraco.
Configuring filtering in Umbraco UI Builder, the backoffice UI builder for Umbraco.
Configuring collection in Umbraco UI Builder, the backoffice UI builder for Umbraco.
Configuring actions in Umbraco UI Builder, the backoffice UI builder for Umbraco.
Installing Umbraco UI Builder, the backoffice UI builder for Umbraco.
Configuring cards in Umbraco UI Builder, the backoffice UI builder for Umbraco.
Configuring encrypted properties in Umbraco UI Builder, the backoffice UI builder for Umbraco.




Property Editors available with Umbraco UI Builder, the backoffice UI builder for Umbraco.
dotnet add package Umbraco.UIBuilderdotnet add package Umbraco.UIBuilder.Startup// Example
collectionConfig.AddEncryptedProperty(p => p.Secret);Configuring **one-to-many** relationships in Umbraco UI Builder, the backoffice UI builder for Umbraco.
Startup.csbuilder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddUIBuilder(cfg => {
// Apply your configuration here
})
.AddDeliveryApi()
.AddComposers()
.Build();[TableName("StudentProjects")]
[PrimaryKey("Id")]
public class StudentProject
{
[PrimaryKeyColumn]
public int Id { get; set; }
public string Name { get; set; }
public int StudentId { get; set; }
}public class StudentProjectController : Controller
{
private readonly IRepositoryFactory _repositoryFactory;
public StudentProjectController(IRepositoryFactory repositoryFactory)
{
_repositoryFactory = repositoryFactory;
}
public IActionResult Index(int projectId)
{
var childRepository = _repositoryFactory.GetChildRepository<int, StudentProject, int>(projectId);
var list = childRepository.GetAll();
var count = childRepository.GetCount();
var listPaged = childRepository.GetPaged();
return View(list);
}
}Configuring child collections in Umbraco UI Builder, the backoffice UI builder for Umbraco.
// Example
collectionConfig.AddChildCollection<Child>(c => c.Id, c => c.ParentId, "Child", "Children", "A collection of children", childCollectionConfig => {
...
});// Example
collectionConfig.AddChildCollection<Child>(c => c.Id, c => c.ParentId, "Child", "Children", "A collection of children", "icon-umb-users", "icon-umb-users", childCollectionConfig => {
...
});Configuring searchable properties in Umbraco UI Builder, the backoffice UI builder for Umbraco.
Configuring data views in Umbraco UI Builder, the backoffice UI builder for Umbraco.
// Example
collectionConfig.AddDataView("Active", p => p.IsActive);// Example
collectionConfig.AddDataView("Status", "Active", p => p.IsActive);Configuring child collection groups in Umbraco UI Builder, the backoffice UI builder for Umbraco.
// Example
collectionConfig.AddChildCollectionGroup("Family", childCollectionGroupConfig => {
...
});// Example
collectionConfig.AddChildCollectionGroup("Family", "icon-users", childCollectionGroupConfig => {
...
});Using Umbraco entities as reference with an UI Builder collection
Configuring searching in Umbraco UI Builder, the backoffice UI builder for Umbraco.
Configuring field views in Umbraco UI Builder, the backoffice UI builder for Umbraco.
Configuring count cards in Umbraco UI Builder, the backoffice UI builder for Umbraco.
Configuring custom cards in Umbraco UI Builder, the backoffice UI builder for Umbraco.
Conventions used by Umbraco UI Builder, the backoffice UI builder for Umbraco.






[TableName(TableName)]
[PrimaryKey("Id")]
public class MemberReview
{
public const string TableName = "MemberReview";
[PrimaryKeyColumn]
public int Id { get; set; }
public string Title { get; set; }
public string Content { get; set; }
[TypeConverter(typeof(EntityIdentifierToIntTypeConverter))]
public int MemberId { get; set; }
}// Chaining example
config.AddSection("Repositories").Tree().AddCollection<People>(p => p.Id, "Person", "People");
// Delegate example
config.AddSection("Repositories", sectionConfig => {
sectionConfig.Tree(treeConfig => {
treeConfig.AddCollection<People>(p => p.Id, "Person", "People");
});
});boolean// Example
collectionConfig.AddSearchableProperty(p => p.FirstName); // will search for keywords that start with.
collectionConfig.AddSearchableProperty(p => p.FirstName, SearchExpressionPattern.Contains); // will search for keywords that are contained.@model Umbraco.UIBuilder.Web.Models.FieldViewContext
<!-- Insert your markup here -->// Example
public class MyComplexFieldViewViewComponent : ViewComponent
{
public async Task<IViewComponentResult> InvokeAsync(FieldViewContext context)
{
// Do your custom logic here
return View("Default", model);
}
}@model Namespace.Of.Model.Returned.By.Custom.ViewComponent
<!-- Insert your markup here -->public class FieldViewContext
{
public string ViewName { get; set; }
public object Entity { get; set; }
public string PropertyName { get; set; }
public object PropertyValue { get; set; }
}// Example
collectionConfig.AddCard("Older than 30", p => p.Age > 30, cardConfig => {
...
});// Example
collectionConfig.AddCard("Older than 30", "icon-umb-users", p => p.Age > 30, cardConfig => {
...
});// Example
cardConfig.SetColor("blue");// Example
cardConfig.SetSuffix("years");// Example
cardConfig.SetFormat((v) => $"{v}%");// Example
public class AvgPersonAgeCard : Card
{
public override string Alias => "avgPersonAge";
public override string Name => "Average Age";
public override string Icon => "icon-calendar";
public override string Color => "green";
public override string Suffix => "yrs";
public override object GetValue(object parentId = null)
{
// Perform value calculation logic
}
}// Example
collectionConfig.AddCard<AvgPersonAgeCard>();// Example
collectionConfig.AddCard(typeof(AvgPersonAgeCard));Configuring data views builders in Umbraco UI Builder, the backoffice UI builder for Umbraco.
// Example
public class PersonDataViewsBuilder : DataViewsBuilder<Person>
{
public override IEnumerable<DataViewSummary> GetDataViews()
{
// Generate and return a list of data views
}
public override Expression<Func<Person, bool>> GetDataViewWhereClause(string dataViewAlias)
{
// Return a where clause expression for the supplied data view alias
}
}Configuring filterable properties in Umbraco UI Builder, the backoffice UI builder for Umbraco.
// Example
collectionConfig.AddFilterableProperty(p => p.FirstName, filterConfig => filterConfig
// ...
);// Example
filterConfig.SetLabel("First Name");// Example
filterConfig.SetDescription("The first name of the person");// Example
filterConfig.SetOptions(new Dictionary<string, string> {
{ "Option1", "Option One" },
{ "Option2", "Option Two" }
});// Example
filterConfig.AddOption("Option1", "Option One", (val) => val != "Option Two");// Example
filterConfig.SetMode(FilterMode.MultipleChoice);Configuring **many-to-many** relationships in Umbraco UI Builder, the backoffice UI builder for Umbraco.
Configuring the list view of a collection in Umbraco UI Builder, the backoffice UI builder for Umbraco.










// Example
foreach(var p in Model.People){
...
}// Example
collectionConfig.SetDataViewsBuilder<PersonDataViewsBuilder>();// Example
collectionConfig.SetDataViewsBuilder(typeof(PersonDataViewsBuilder));// Example
collectionConfig.SetDataViewsBuilder(new PersonDataViewsBuilder());[TableName("Students")]
[PrimaryKey("Id")]
public class Student
{
[PrimaryKeyColumn]
public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
}[TableName("Courses")]
[PrimaryKey("Id")]
public class Course
{
[PrimaryKeyColumn]
public int Id { get; set; }
public string Title { get; set; }
public string Description { get; set; }
}[TableName("StudentsCourses")]
[PrimaryKey(new[] { "StudentId", "CourseId" })]
public class StudentCourse
{
[PrimaryKeyColumn]
public int StudentId { get; set; }
[PrimaryKeyColumn]
public int CourseId { get; set; }
}collectionConfig.AddRelatedCollection<Student, Course, StudentCourse>(x => x.Id, "Student Course", "Students Courses", relationConfig =>
{
relationConfig
.SetAlias("studentsCourses")
.SetJunction<StudentCourse>(x => x.StudentId, y => y.CourseId);
});collectionConfig.Editor(editorConfig =>
{
editorConfig.AddTab("General", tabConfig =>
tabConfig.AddFieldset("General", fieldsetConfig =>
{
fieldsetConfig.AddField(x => x.FirstName).MakeRequired();
fieldsetConfig.AddField(x => x.LastName).MakeRequired();
fieldsetConfig.AddField(x => x.Email).MakeRequired();
fieldsetConfig.AddRelatedCollectionPickerField<Course>("studentsCourses", "Courses Related Picker", "Courses");
}));
});{
var db = _scopeProvider.CreateScope().Database;
var sql = db.SqlContext.Sql()
.Select(new[] { "StudentId", "CourseId" } )
.From("StudentsCourses")
.Where($"studentId = @0", parentId);
var result = db.Fetch<StudentCourse>(sql);
return result;
}{
var db = _scopeProvider.CreateScope().Database;
var type = entity.GetType();
var studentId = type.GetProperty("StudentId").GetValue(entity);
var courseId = type.GetProperty("CourseId").GetValue(entity);
// delete relation if exists
db.Execute("DELETE FROM StudentsCourses WHERE StudentId = @0 AND CourseId = @1",
studentId,
courseId);
db.Execute("INSERT INTO StudentsCourses (StudentId, CourseId) VALUES (@0, @1)",
studentId,
courseId);
return entity;
}// Example
collectionConfig.ListView(listViewConfig => {
...
});// Example
listViewConfig.AddField(p => p.FirstName, fieldConfig => {
...
});// Example
fieldConfig.SetHeading("First Name");// Example
fieldConfig.SetFormat((v, p) => $"{v} years old");// Example
fieldConfig.SetView("ImageFieldView");// Example
fieldConfig.SetView<ImageFieldView>();// Example
fieldConfig.SetVisibility(ctx => ctx.UserGroups.Any(x => x.Alias == "editor"));// Example
listViewConfig.SetPageSize(20);<ItemGroup>
<PackageReference Include="Umbraco.UIBuilder" Version="xx.x.x" />
</ItemGroup>Configuring actions in Umbraco UI Builder, the backoffice UI builder for Umbraco.
// Example
public class MyAction : Action<ActionResult>
{
public override string Icon => "icon-settings";
public override string Alias => "myaction";
public override string Name => "My Action";
public override bool ConfirmAction => true;
public override ActionResult Execute(string collectionAlias, object[] entityIds)
{
// Perform operation here...
}
}Creating your first integration with Umbraco UI Builder, the backoffice UI builder for Umbraco.
CREATE TABLE [Person] (
[Id] int IDENTITY (1,1) NOT NULL,
[Name] nvarchar(255) NOT NULL,
[JobTitle] nvarchar(255) NOT NULL,
[Email] nvarchar(255) NOT NULL,
[Telephone] nvarchar(255) NOT NULL,
[Age] int NOT NULL,
[Avatar] nvarchar(255) NOT NULL
);[TableName("Person")]
[PrimaryKey("Id")]
public class Person
{
[PrimaryKeyColumn]
public int Id { get; set; }
public string Name { get; set; }
public string JobTitle { get; set; }
public string Email { get; set; }
public string Telephone { get; set; }
public int Age { get; set; }
public string Avatar { get; set; }
}Configuring context apps in Umbraco UI Builder, the backoffice UI builder for Umbraco.
// Example
withTreeConfig.AddContextApp("Comments", contextAppConfig => {
...
});// Example
withTreeConfig.AddContextApp("Comments", "icon-chat", contextAppConfig => {
...
});Configuring dashboards in Umbraco UI Builder, the backoffice UI builder for Umbraco.
// Example
sectionConfig.AddDashboard("Team", dashboardConfig => {
...
});// Example
sectionConfig.AddDashboardBefore("contentIntro", "Team", dashboardConfig => {
...
});Configuring folders to organise trees in Umbraco UI Builder, the backoffice UI builder for Umbraco.
// Example
treeConfig.AddFolder("Settings", folderConfig => {
...
});// Example
treeConfig.AddFolder("Settings", "icon-settings", folderConfig => {
...
});Configuring event handlers in Umbraco UI Builder, the backoffice UI builder for Umbraco.
A list of useful Umbraco aliases for use with Umbraco UI Builder, the backoffice UI builder for Umbraco.






AfterAfterCanceltruedotnet remove package Konstruktrmdir App_Plugins\Konstruktdotnet add package Umbraco.UIBuilderbuilder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.AddUIBuilder(cfg => {
// The rest of your configuration
})
.Build();"Umbraco": {
"Licenses": {
"Umbraco.UIBuilder": "YOUR_LICENSE_KEY"
}
}// Example
public class MyAction : Action<MyActionSettings, ActionResult>
{
public override string Icon => "icon-settings";
public override string Alias => "myaction";
public override string Name => "My Action";
public override bool ConfirmAction => true;
public override void Configure(SettingsConfigBuilder<MyActionSettings> settingsConfig)
{
settingsConfig.AddFieldset("General", fieldsetConfig => fieldsetConfig
.AddField(s => s.RecipientName).SetLabel("Recipient Name")
.AddField(s => s.RecipientEmail).SetLabel("Recipient Email"));
}
public override ActionResult Execute(string collectionAlias, object[] entityIds, MyActionSettings settings)
{
// Perform operation here...
}
}
public class MyActionSettings
{
public string RecipientName { get; set; }
public string RecipientEmail { get; set; }
}// Example
collectionConfig.AddAction<ExportMenuAction>();// Example
collectionConfig.AddAction(actionType);// Example
collectionConfig.AddAction(action);builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.AddUIBuilder(cfg => {
// Apply your configuration here
})
.Build();...
.AddUIBuilder(cfg => {
cfg.AddSectionAfter("media", "Repositories", sectionConfig => sectionConfig
.Tree(treeConfig => treeConfig
.AddCollection<Person>(x => x.Id, "Person", "People", "A person entity", "icon-umb-users", "icon-umb-users", collectionConfig => collectionConfig
.SetNameProperty(p => p.Name)
.ListView(listViewConfig => listViewConfig
.AddField(p => p.JobTitle).SetHeading("Job Title")
.AddField(p => p.Email)
)
.Editor(editorConfig => editorConfig
.AddTab("General", tabConfig => tabConfig
.AddFieldset("General", fieldsetConfig => fieldsetConfig
.AddField(p => p.JobTitle).MakeRequired()
.AddField(p => p.Age)
.AddField(p => p.Email).SetValidationRegex("[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+")
.AddField(p => p.Telephone).SetDescription("inc area code")
)
.AddFieldset("Media", fieldsetConfig => fieldsetConfig
.AddField(p => p.Avatar).SetDataType("Upload File")
)
)
)
)
)
);
})
...// Example
withTreeConfig.AddContextAppBefore("umbContent", "Comments", contextAppConfig => {
...
});// Example
withTreeConfig.AddContextAppBefore("umbContent", "Comments", "icon-chat", contextAppConfig => {
...
});// Example
withTreeConfig.AddContextAppAfter("umbContent", "Comments", contextAppConfig => {
...
});// Example
withTreeConfig.AddContextAppAfter("umbContent", "Comments", "icon-chat", contextAppConfig => {
...
});// Example
contextAppConfig.SetAlias("comments");// Example
contextAppConfig.SetIconColor("blue");// Example
contextAppConfig.SetVisibility(appCtx => appCtx.Source is IContent content && content.ContentType.Alias == "blogPost");// Example
contextAppConfig.AddCollection<Comment>(p => p.Id, p=> "Comment", "Comments", "A collection of comments", collectionConfig => {
...
});// Example
contextAppConfig.AddCollection<Comment>(p => p.Id, "Comment", "Comments", "A collection of comments", "icon-chat", "icon-chat", collectionConfig => {
...
});// Example
sectionConfig.AddDashboardAfter("contentIntro", "Team", dashboardConfig => {
...
});// Example
dashboardConfig.SetAlias("team");// Example
dashboardConfig.SetVisibility(visibilityConfig => visibilityConfig
.ShowForUserGroup("admin")
.HideForUserGroup("translator")
);// Example
dashboardConfig.SetCollection<Comment>(p => p.Id, p=> "Team Member", "Team Members", "A collection of team members", collectionConfig => {
...
});// Example
dashboardConfig.SetCollection<Comment>(p => p.Id, "Team Member", "Team Members", "A collection of team members", "icon-umm-user", "icon-umb-user", collectionConfig => {
...
});// Example
folderConfig.SetAlias("settings");// Example
folderConfig.SetIconColor("blue");// Example
folderConfig.AddFolder("Categories", subFolderConfig => {
...
});// Example
folderConfig.AddFolder("Categories", "icon-tags", subFolderConfig => {
...
});// Example
folderConfig.AddCollection<Person>(p => p.Id, "Person", "People", "A collection of people", collectionConfig => {
...
});// Example
folderConfig.AddCollection<Person>(p => p.Id, "Person", "People", "A collection of people", "icon-umb-users", "icon-umb-users", collectionConfig => {
...
});public class MyEntitySavingEventHandler : INotificationHandler<EntitySavingNotification> {
public void Handle(ContentPublishedNotification notification)
{
// Handle the event here
}
}builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.AddNotificationHandler<EntitySavingNotification, MyEntitySavingEventHandler>()
.Build();// Example
public class MyEntitySavingEventHandler : INotificationHandler<EntitySavingNotification> {
public void Handle(EntitySavingNotification notification)
{
var person = notification.Entity.After as Person;
if (person != null){
...
}
}
}// Example
public class MyEntitySavedEventHandler : INotificationHandler<EntitySavedNotification> {
public void Handle(EntitySavedNotification notification)
{
var person = notification.Entity.After as Person;
if (person != null){
...
}
}
}// Example
public class MyEntityDeletingEventHandler : INotificationHandler<EntityDeletingNotification> {
public void Handle(EntityDeletingNotification notification)
{
var person = notification.Entity.After as Person;
if (person != null){
...
}
}
}// Example
public class MyEntityDeletedEventHandler : INotificationHandler<EntityDeletedNotification> {
public void Handle(EntityDeletedNotification notification)
{
var person = notification.Entity.After as Person;
if (person != null){
...
}
}
}// Example
public class MySqlQueryBuildingEventHandler : INotificationHandler<SqlQueryBuildingNotification> {
public void Handle(SqlQueryBuildingNotification notification)
{
notification.Sql = notification.Sql.Append("WHERE MyId = @0", 1);
}
}// Example
public class MySqlQueryBuiltEventHandler : INotificationHandler<SqlQueryBuiltNotification> {
public void Handle(SqlQueryBuiltNotification notification)
{
notification.Sql = notification.Sql.Append("WHERE MyId = @0", 1);
}
}Configuring virtual sub trees in Umbraco UI Builder, the backoffice UI builder for Umbraco.
// Example
withTreeConfig.AddVirtualSubTree(ctx => ctx.Source.Id == 1056, contextAppConfig => {
...
});Key User Interface Concepts used by Umbraco UI Builder, the backoffice UI builder for Umbraco.
Configuring the editor of a collection in Umbraco UI Builder, the backoffice UI builder for Umbraco.
Configuring sections in Umbraco UI Builder, the backoffice UI builder for Umbraco.









// Example
withTreeConfig.AddVirtualSubTreeBefore(ctx => ctx.Source.Id == 1056, treeNode => treeNode.Name == "Settings", contextAppConfig => {
...
});// Example
withTreeConfig.AddVirtualSubTreeAfter(ctx => ctx.Source.Id == 1056, treeNode => treeNode.Name == "Settings", contextAppConfig => {
...
});public class VirtualSubTreeFilterContext
{
public NodeContext Source { get; }
public IEnumerable<IReadOnlyUserGroup> UserGroups { get; }
public IServiceProvider ServiceProvider { get; }
}
public class NodeContext
{
public string Id { get; }
public string TreeAlias { get; }
public string SectionAlias { get; }
public FormCollection QueryString { get; }
}withTreeConfig.AddVirtualSubTree(ctx =>
{
using var umbracoContextRef = ctx.ServiceProvider.GetRequiredService<IUmbracoContextFactory>().EnsureUmbracoContext();
if (!int.TryParse(ctx.Source.Id, out int id))
return false;
return (umbracoContextRef.UmbracoContext.Content.GetById(id)?.ContentType.Alias ?? "") == "textPage";
},
virtualNodeConfig => virtualNodeConfig
...
);public class TreeNode
{
public object Id { get; }
public object ParentId { get; }
public string Alias { get; }
public string Name { get; }
public string NodeType { get; }
public string Path { get; }
public string RoutePath { get; }
public IDictionary<string, object> AdditionalData { get; }
...
}treeNode => treeNode.alias == "settings"public interface ITreeHelper
{
string TreeAlias { get; }
string GetUniqueId(string nodeId, FormCollection queryString);
object GetEntityId(string uniqueId);
string GetPath(string uniqueId);
}builder.Services.AddSingleton<ITreeHelper, MyCustomTreeHelper>();// Example
collectionConfig.Editor(editorConfig => {
...
});// Example
editorConfig.AddTab("General", tabConfig => {
...
});// Example
tabConfig.Sidebar(sidebarConfig => {
...
});// Example
tabConfig.SetVisibility(ctx => ctx.EditorMode == EditorMode.Create);// Example
tabConfig.AddFieldset("Contact", fieldsetConfig => {
...
});// Example
fieldsetConfig.SetVisibility(ctx => ctx.EditorMode == EditorMode.Create);// Example
fieldsetConfig.AddField(p => p.FirstName, fieldConfig => {
...
});// Example
fieldConfig.SetLabel("First Name");// Example
fieldConfig.HideLabel();// Example
fieldConfig.SetDescription("Enter your age in years");// Example
fieldConfig.SetDataType("Richtext Editor");// Example
fieldConfig.SetDataType(-88);// Example
fieldConfig.SetDefaultValue(10);// Example
fieldConfig.SetDefaultValue(() => DateTime.Now);// Example
fieldConfig.MakeRequired();// Example
fieldConfig.SetValidationRegex("[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}");// Example
fieldConfig.MakeReadOnly();// Example
fieldConfig.MakeReadOnly(distanceProp => $"{distanceProp:## 'km'}");// Example
fieldConfig.MakeReadOnly("myReadOnlyEditor");// Example
fieldConfig.MakeReadOnly(ctx => ctx.EditorMode == EditorMode.Create);// Example
fieldConfig.MakeReadOnly(ctx => ctx.EditorMode == EditorMode.Create, distanceProp => $"{distanceProp:## 'km'}");// Example
fieldConfig.MakeReadOnly(ctx => ctx.EditorMode == EditorMode.Create, "myReadOnlyEditor");// Example
fieldConfig.SetVisibility(ctx => ctx.EditorMode == EditorMode.Create);// Example
config.AddSection("Repositories", sectionConfig => {
...
});// Example
config.AddSectionBefore("settings", "Repositories", sectionConfig => {
...
});// Example
config.AddSectionAfter("media", "Repositories", sectionConfig => {
...
});// Example
sectionConfig.SetAlias("repositories");// Example
sectionConfig.Tree(treeConfig => {
...
});// Example
sectionConfig.AddDashboard("Team", dashboardConfig => {
...
});// Example
sectionConfig.AddDashboardBefore("contentIntro", "Team", dashboardConfig => {
...
});// Example
sectionConfig.AddDashboardAfter("contentIntro", "Team", dashboardConfig => {
...
});// Example
config.WithSection("member", withSectionConfig => {
...
});// Example
withSectionConfig.AddTree("My Tree", "icon-folder", treeConfig => {
...
});// Example
withSectionConfig.AddTree("My Group", "My Tree", "icon-folder", treeConfig => {
...
});// Example
withSectionConfig.AddTreeBefore("member", "My Tree", "icon-folder", treeConfig => {
...
});// Example
withSectionConfig.AddTreeAfter("member", "My Tree", "icon-folder", treeConfig => {
...
});// Example
withSectionConfig.AddDashboard("Team", dashboardConfig => {
...
});// Example
withSectionConfig.AddDashboardBefore("contentIntro", "Team", dashboardConfig => {
...
});// Example
withSectionConfig.AddDashboardAfter("contentIntro", "Team", dashboardConfig => {
...
});The basics of a collection configuration in Umbraco UI Builder, the backoffice UI builder for Umbraco.
// Example
folderConfig.AddCollection<Person>(p => p.Id, "Person", "People", "A collection of people", collectionConfig => {
...
});// Example
folderConfig.AddCollection<Person>(p => p.Id, "Person", "People", "A collection of people", "icon-umb-users", "icon-umb-users", collectionConfig => {
...
});// Example
collectionConfig.SetAlias("person");// Example
collectionConfig.SetIconColor("blue");// Example
collectionConfig.SetNameProperty(p => p.Name);// Example
collectionConfig.SetNameProperty(p => p.Name, "Person Name");// Example
collectionConfig.SetNameFormat(p => $"{p.FirstName} {p.LastName}");// Example
collectionConfig.SetSortProperty(p => p.FirstName);// Example
collectionConfig.SetSortProperty(p => p.FirstName, SortDirection.Descending);// Example
collectionConfig.SetDateCreatedProperty(p => p.DateCreated);// Example
collectionConfig.SetDateModifiedProperty(p => p.DateModified);// Example
collectionConfig.SetDeletedProperty(p => p.Deleted);// Example
collectionConfig.DisableCreate();// Example
collectionConfig.DisableCreate(ctx => ctx.UserGroups.Any(x => x.Alias == "editor"));// Example
collectionConfig.DisableUpdate();// Example
collectionConfig.DisableUpdate(ctx => ctx.UserGroups.Any(x => x.Alias == "editor"));// Example
collectionConfig.DisableDelete();// Example
collectionConfig.DisableDelete(ctx => ctx.UserGroups.Any(x => x.Alias == "editor"));// Example
collectionConfig.MakeReadOnly();// Example
collectionConfig.MakeReadOnly(ctx => ctx.UserGroups.Any(x => x.Alias == "editor"));// Example
collectionConfig.SetVisibility(ctx => ctx.UserRoles.Any(x => x.Alias == "editor"));// Example
collectionConfig.SetConnectionString("myConnectionStringName");Controlling the visibility of actions in Umbraco UI Builder, the backoffice UI builder for Umbraco.
Configuring value mappers in Umbraco UI Builder, the backoffice UI builder for Umbraco.





// Example
collectionConfig.AddAction<ExportMenuAction>(actionConfig => actionConfig
.SetVisibility(x => x.ActionType == ActionType.Bulk
|| x.ActionType == ActionType.Row)
);// Example
collectionConfig.AddAction(typeof(ExportMenuAction), actionConfig => actionConfig
.SetVisibility(x => x.ActionType == ActionType.Bulk
|| x.ActionType == ActionType.Row)
);// Example
collectionConfig.AddAction(action, actionConfig => actionConfig
.SetVisibility(x => x.ActionType == ActionType.Bulk
|| x.ActionType == ActionType.Row)
);// Example
public class MyValueMapper : ValueMapper
{
public override object EditorToModel(object input)
{
// Tweak the input and return mapped object
...
}
public override object ModelToEditor(object input)
{
// Tweak the input and return mapped object
...
}
}// Example
fieldConfig.SetValueMapper<MyValueMapper>();// Example
fieldConfig.SetValueMapper(typeof(MyValueMapper));// Example
fieldConfig.SetValueMapper(new MyValueMapper());Configuring repositories in Umbraco UI Builder, the backoffice UI builder for Umbraco.
// Example
public class PersonRepository : Repository<Person, int> {
public PersonRepository(RepositoryContext context)
: base(context)
{ }
protected override int GetIdImpl(Person entity) {
return entity.Id;
}
protected override Person GetImpl(int id) {
...
}
protected override Person SaveImpl(Person entity) {
...
}
protected override void DeleteImpl(int id) {
...
}
protected override IEnumerable<Person> GetAllImpl(Expression<Func<Person, bool>> whereClause, Expression<Func<Person, object>> orderBy, SortDirection orderByDirection) {
...
}
protected override PagedResult<Person> GetPagedImpl(int pageNumber, int pageSize, Expression<Func<Person, bool>> whereClause, Expression<Func<Person, object>> orderBy, SortDirection orderByDirection) {
...
}
protected override long GetCountImpl(Expression<Func<Person, bool>> whereClause) {
...
}
protected override IEnumerable<TJunctionEntity> GetRelationsByParentIdImpl<TJunctionEntity>(int parentId, string relationAlias)
{
...
}
protected override TJunctionEntity SaveRelationImpl<TJunctionEntity>(TJunctionEntity entity)
{
...
}
}// Example
collectionConfig.SetRepositoryType<PersonRepositoryType>();// Example
collectionConfig.SetRepositoryType(typeof(PersonRepositoryType));// Example
public class MyController : Controller
{
private readonly Repository<Person, int> _repo;
public MyController(IRepositoryFactory repoFactory)
{
_repo = repoFactory.GetRepository<Person, int>();
}
}// Example
public class MyController : Controller
{
private readonly Repository<Person, int> _repo;
public MyController(IRepositoryFactory repoFactory)
{
_repo = repoFactory.GetRepository<Person, int>("person");
}
}
// Example
withSectionConfig.AddTree("My Tree", "icon-folder", treeConfig => {
...
});// Example
withSectionConfig.AddTree("My Group", "My Tree", "icon-folder", treeConfig => {
...
});// Example
withSectionConfig.AddTreeBefore("member", "My Tree", "icon-folder", treeConfig => {
...
});// Example
withSectionConfig.AddTreeAfter("member", "My Tree", "icon-folder", treeConfig => {
...
});// Example
collectionConfig.SetIconColor("blue");// Example
treeConfig.AddGroup("Settings", groupConfig => {
...
});// Example
treeConfig.AddFolder("Settings", folderConfig => {
...
});// Example
treeConfig.AddFolder("Settings", "icon-settings", folderConfig => {
...
});// Example
treeConfig.AddCollection<Person>(p => p.Id, "Person", "People", "A collection of people", collectionConfig => {
...
});// Example
treeConfig.AddCollection<Person>(p => p.Id, "Person", "People", "A collection of people", "icon-umb-users", "icon-umb-users", collectionConfig => {
...
});// Example
sectionConfig.WithTree("content", withTreeConfig => {
...
});// Example
withTreeConfig.AddContextApp("Comments", contextAppConfig => {
...
});// Example
withTreeConfig.AddContextApp("Comments", "icon-chat", contextAppConfig => {
...
});// Example
withTreeConfig.AddContextAppBefore("umbContent", "Comments", contextAppConfig => {
...
});// Example
withTreeConfig.AddContextAppBefore("umbContent", "Comments", "icon-chat", contextAppConfig => {
...
});// Example
withTreeConfig.AddContextAppAfter("umbContent", "Comments", contextAppConfig => {
...
});// Example
withTreeConfig.AddContextAppAfter("umbContent", "Comments", "icon-chat", contextAppConfig => {
...
});