Skip to content

Commit e5f5e37

Browse files
committed
Updated articles
1 parent cbbb58d commit e5f5e37

File tree

2 files changed

+32
-25
lines changed

2 files changed

+32
-25
lines changed
Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,32 @@
11
---
2-
description: Conventions used by Umbraco UI Builder, the backoffice UI builder for Umbraco.
2+
description: Guidelines for fluent configuration and naming conventions in Umbraco UI Builder.
33
---
44

55
# Conventions
66

77
## Fluent Conventions
88

9-
Most configuration methods in Umbraco UI Builder aim to be fluent. This means that they return a relevant config instance allowing to chain multiple methods calls together in one. For those who prefer to be a bit more verbose, many methods also accept an optional lambda expression. This allows you to pass in a delegate to perform the inner configuration of the element being defined.
9+
Umbraco UI Builder follows a fluent configuration style, allowing method chaining for concise and readable code. Alternatively, a lambda expression can be used for a more structured approach.
10+
11+
### Chaining Example
12+
13+
```csharp
14+
config.AddSection("Repositories")
15+
.Tree()
16+
.AddCollection<People>(p => p.Id, "Person", "People");
17+
```
18+
19+
### Lambda Expression Example Example
1020

1121
```csharp
12-
// Chaining example
13-
config.AddSection("Repositories").Tree().AddCollection<People>(p => p.Id, "Person", "People");
14-
15-
// Delegate example
16-
config.AddSection("Repositories", sectionConfig => {
17-
sectionConfig.Tree(treeConfig => {
18-
treeConfig.AddCollection<People>(p => p.Id, "Person", "People");
19-
});
22+
config.AddSection("Repositories", sectionConfig => {
23+
sectionConfig.Tree(treeConfig => {
24+
treeConfig.AddCollection<People>(p => p.Id, "Person", "People");
25+
});
2026
});
2127
```
2228

2329
## Naming Conventions
2430

25-
Throughout the API, where a method name starts with **Add** then multiple configurations can be declared. Whereas if a method name starts with **Set** then only one instance of the configuration can be declared within the current configuration context.
31+
* Methods prefixed with **Add** allow multiple configurations.
32+
* Methods prefixed with **Set** permit only one instance within the current configuration context.

15/umbraco-ui-builder/miscellaneous/umbraco-aliases.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
---
2-
description: A list of useful Umbraco aliases for use with Umbraco UI Builder, the backoffice UI builder for Umbraco.
2+
description: Common Umbraco aliases used in Umbraco UI Builder for Sections, Dashboards, Workspace Views, and Trees.
33
---
44

55
# Umbraco Aliases
66

7-
In a number of places in the Umbraco UI Builder API, you are required to know the aliases of other elements. For example, when you are adding sections, context apps, or dashboards before/after other instances. This is basic enough when it's referencing aliases of things defined in the Umbraco UI Builder config. However, for existing Umbraco instances it can be hard to find them so below is documented a number of known aliases for different elements.
7+
Umbraco UI Builder requires aliases for various elements, such as sections, context apps, and dashboards. While aliases for elements defined in the UI Builder config are straightforward, finding aliases for existing Umbraco instances can be challenging. Below is a list of known aliases for reference.
88

9-
## Dashboard aliases
9+
## Dashboard Aliases
1010

11-
### **Content**
11+
### Content
1212

1313
| Name | Alias |
1414
| -- | -- |
1515
| Getting Started | `contentIntro` |
1616
| Redirect URL Management | `contentRedirectManager` |
1717

18-
### **Media**
18+
### Media
1919

2020
| Name | Alias |
2121
| -- | -- |
2222
| Content | `mediaFolderBrowser` |
2323

24-
### **Settings**
24+
### Settings
2525

2626
| Name | Alias |
2727
| -- | -- |
@@ -31,36 +31,36 @@ In a number of places in the Umbraco UI Builder API, you are required to know th
3131
| Models Builder | `settingsModelsBuilder` |
3232
| Health Check | `settingsHealthCheck` |
3333

34-
### **Members**
34+
### Members
3535

3636
| Name | Alias |
3737
| -- | -- |
3838
| Getting Started | `memberIntro` |
3939

40-
## Content App aliases
40+
## Workspace Views Aliases
4141

42-
### **Content**
42+
### Content
4343

4444
| Name | Alias |
4545
| -- | -- |
4646
| Content | `umbContent` |
4747
| Info | `umbInfo` |
4848

49-
### **Media**
49+
### Media
5050

5151
| Name | Alias |
5252
| -- | -- |
5353
| Content | `umbContent` |
5454
| Info | `umbInfo` |
5555

56-
### **Members**
56+
### Members
5757

5858
| Name | Alias |
5959
| -- | -- |
6060
| Content | `umbContent` |
6161
| Info | `umbInfo` |
6262

63-
### **ContentTypes**
63+
### ContentTypes
6464

6565
| Name | Alias |
6666
| -- | -- |
@@ -69,7 +69,7 @@ In a number of places in the Umbraco UI Builder API, you are required to know th
6969
| Permissions | `permissions` |
7070
| Templates | `templates` |
7171

72-
## Section aliases
72+
## Section Aliases
7373

7474
| Name | Alias |
7575
| -- | -- |
@@ -82,7 +82,7 @@ In a number of places in the Umbraco UI Builder API, you are required to know th
8282
| Forms | `forms` |
8383
| Translation | `translation` |
8484

85-
## Tree aliases
85+
## Tree Aliases
8686

8787
| Name | Alias |
8888
| -- | -- |

0 commit comments

Comments
 (0)