You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 15/umbraco-ui-builder/collections/child-collections.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,10 @@ This page is a work in progress and may undergo further revisions, updates, or a
9
9
{% endhint %}
10
10
11
11
A child collection is a container for data models that are tied to a parent collection. The child collection system shares the [Collections](the-basics.md) API, offering flexibility for managing and displaying related data within your backoffice UI.
By default, child collections are displayed as context apps within the parent model's editor view. If multiple child collections lead to an overcrowded context apps area, consider using the [Child Collection Groups API](child-collection-groups.md). Using the aPI you can group related child collections under a single context app, with each child collection appearing in separate tabs.
15
+
By default, child collections are displayed as context apps within the parent model's editor view. If multiple child collections lead to an overcrowded context apps area, consider using the [Child Collection Groups API](child-collection-groups.md). Using the API, you can group related child collections under a single context app, with each child collection appearing in separate tabs.
Copy file name to clipboardExpand all lines: 15/umbraco-ui-builder/collections/field-views.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Field Views allow customization of the markup used by a field when displayed in
10
10
11
11
You can define a field view in one of two ways:
12
12
13
-
### 1. Basic View File for the Built-In `FieldView` View Component
13
+
### Basic View File for the Built-In `FieldView` View Component
14
14
15
15
For field views, place a view file in the `/Views/Shared/Components/FieldView` folder with the following markup.
16
16
@@ -21,7 +21,7 @@ For field views, place a view file in the `/Views/Shared/Components/FieldView` f
21
21
22
22
WTo register the view, pass the name of the view file (excluding the `.cshtml` file extension) to the relevant API method.
23
23
24
-
### 2. Custom View Component
24
+
### Custom View Component
25
25
26
26
For more complex field views, create a custom view component class that can use dependency injection for any required dependencies. Use the following signature:
In Umbraco, every entity is expected to have a name property. To ensure the Umbraco UI Builder knows which property to use, you must specify it. If the entity lacks a dedicated name property, you can define how to construct a name using other properties. This is done using either the `SetNameProperty` or `SetNameFormat` methods on a `Collection` config builder instance.
89
+
In Umbraco, every entity is expected to have a name property. To ensure the Umbraco UI Builder knows which property to use, you must specify it.
90
+
91
+
If the entity lacks a dedicated name property, you can define how to construct a name using other properties. This is done using either the `SetNameProperty` or `SetNameFormat` methods on a `Collection` config builder instance.
### Using the `SetNameProperty()` Method with Custom Heading
108
110
109
-
Specifies which property of your entity should be used as the name property and defines a custom heading for the list view column. The property must be of type `string`. Setting a name property ensures its value is displayed as the label for the entity in trees and list views. It will also be editable in the editor interface's header region. Additionally, the property is automatically added to the searchable properties collection and used as the default sort property.
111
+
Specifies which property of your entity should be used as the name property and defines a custom heading for the list view column. The property must be of type `string`.
112
+
113
+
Setting a name property ensures its value is displayed as the label for the entity in trees and list views. It will also be editable in the editor interface's header region.
114
+
115
+
Additionally, the property is automatically added to the searchable properties collection and used as the default sort property.
Defines a format expression to dynamically generate a label for the entity in trees and list views. This method is used when there is no single name property available on the entity. As a result, none of the default behaviors of the `SetNameProperty` method, such as automatic sorting, searching, or header editing, will apply.
131
+
Defines a format expression to dynamically generate a label for the entity in trees and list views.
132
+
133
+
This method is used when there is no single name property available on the entity. As a result, none of the default behaviors of the `SetNameProperty` method, such as automatic sorting, searching, or header editing, will apply.
126
134
127
135
#### Method Syntax
128
136
@@ -210,7 +218,9 @@ By default, entities deleted via the Umbraco UI Builder repository are permanent
210
218
211
219
### Using the `SetDeletedProperty()` Method
212
220
213
-
Defines the property of the entity to use as the deleted flag. The property must be of type `boolean` or `int`. When set, delete actions will mark the entity as deleted by setting the flag instead of removing the entity. For `boolean` properties, the flag is set to `True` when deleted. For `int` properties, the flag is set to a UTC Unix timestamp representing the deletion date. Additionally, fetch actions will automatically exclude deleted entities.
221
+
Defines the property of the entity to use as the deleted flag. The property must be of type `boolean` or `int`. When set, delete actions will mark the entity as deleted by setting the flag instead of removing the entity.
222
+
223
+
For `boolean` properties, the flag is set to `True` when deleted. For `int` properties, the flag is set to a UTC Unix timestamp representing the deletion date. Additionally, fetch actions will automatically exclude deleted entities.
0 commit comments