|
1 | 1 | --- |
2 | | -description: Using the entity picker property editor with Umbraco UI Builder, the backoffice UI builder for Umbraco. |
| 2 | +description: Configure and use the Entity Picker property editor in Umbraco UI Builder to select entities from a collection. |
3 | 3 | --- |
4 | 4 |
|
5 | 5 | # Entity Picker |
6 | 6 |
|
7 | | -The Entity Picker property editor is an Umbraco property editor that lets you select one or more entities from an Umbraco UI Builder collection. |
| 7 | +The Entity Picker property editor allows selecting one or more entities from an Umbraco UI Builder collection. |
8 | 8 |
|
9 | | -## Configuring an entity picker |
| 9 | +## Configuring an Entity Picker |
10 | 10 |
|
11 | | -To configure an entity picker you need to create a Data Type in the Umbraco backoffice. From the property editor dropdown choose 'Umbraco UI Builder Entity Picker'. |
| 11 | +To configure an entity picker, follow these steps: |
12 | 12 |
|
13 | | - |
| 13 | +1. Go to the **Settings** section in the Umbraco backoffice. |
| 14 | +2. Create a **New Data Type**. |
| 15 | +3. Select **UI Builder Entity Picker** from the **Property Editor** field. |
14 | 16 |
|
15 | | -From there choose 'Section' and 'Collection' you wish to pick entities from. You can also choose an optional list view 'Data View' if there are any configured. |
| 17 | + |
16 | 18 |
|
17 | | -You can also set a minimum and maximum number of items to be able to pick if required. |
| 19 | +4. Enter a **Name** for the picker and click **Save**. |
| 20 | +5. Select the **Section** the collection is located in. |
| 21 | +6. Select the **Collection** to pick the entities from. |
| 22 | +7. *[Optional]* Select a list view **Data View**, if configured. |
| 23 | +8. Enter a **Minimum number of items** and **Maximum number of items** that can be selected. |
| 24 | +9. Click **Save**. |
18 | 25 |
|
19 | | -With an entity picker Data Type defined, finish off the configuration by adding it to the desired Document Type definition. |
| 26 | +After defining the entity picker Data Type, add it to the desired Document Type. |
20 | 27 |
|
21 | 28 |  |
22 | 29 |
|
23 | | -## Using an entity picker |
| 30 | +## Using an Entity Picker |
24 | 31 |
|
25 | | -Using the entity picker should be pretty familiar as it aims to mimic the content picker as closely as possible. |
| 32 | +The entity picker functions similarly to the content picker. |
26 | 33 |
|
27 | | -To pick an entity click the 'Add' link to launch the picker dialog. The dialog should present a paginated list of entities to pick from. If any searchable fields were configured for the entity type, you can perform a search by typing a search term in the search input field. |
| 34 | +To pick an entity, follow these steps: |
28 | 35 |
|
29 | | - |
| 36 | +1. Go to the Document Type where the entity picker Data Type is added. |
| 37 | +2. Click **Add** to open the picker dialog, displaying a paginated list of entities. |
| 38 | +3. *[Optional]* If searchable fields are configured, use the search input field to filter results. |
30 | 39 |
|
31 | | -To pick your items click on the entity names and then click 'Select' in the bottom right-hand corner. |
| 40 | + |
32 | 41 |
|
33 | | -The picker should display a summary of the selected entities which can be sorted by dragging the selected entities into the desired order. |
| 42 | +4. Click on the entity names. |
| 43 | +5. Click **Submit**. |
| 44 | + The picker displays a summary of selected entities, which can be reordered by dragging them. |
| 45 | +6. Click **Save** or **Save and publish** to save the changes. |
34 | 46 |
|
35 | 47 |  |
36 | 48 |
|
37 | | -To save the value either **save** or **save and publish** the current document. |
| 49 | +## Retrieving the Value of an Entity Picker |
38 | 50 |
|
39 | | -## Getting the value of an entity picker |
40 | | - |
41 | | -The entity picker property editor comes with a built-in [value converter](https://docs.umbraco.com/umbraco-cms/extending/property-editors/property-value-converters/). This means that whenever you retrieve the property value from Umbraco it will return the actual selected entities, even converting them to the relevant type. |
| 51 | +The entity picker property editor includes a built-in [value converter](https://docs.umbraco.com/umbraco-cms/customizing/property-editors/property-value-converters). Retrieving the property value from Umbraco returns the selected entities, converting them to the relevant type. |
42 | 52 |
|
43 | 53 | ````csharp |
44 | 54 | // Example |
|
0 commit comments