|
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 **Select a 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 a **Section** and **Collection** to pick entities from. |
| 21 | +6. Optionally, select a list view 'Data View' if configured. |
| 22 | +7. Enter a minimum and maximum number of items that can be selected if required. |
| 23 | +8. Click **Save**. |
18 | 24 |
|
19 | | -With an entity picker Data Type defined, finish off the configuration by adding it to the desired Document Type definition. |
| 25 | +After defining the entity picker Data Type, add it to the desired Document Type definition. |
20 | 26 |
|
21 | 27 |  |
22 | 28 |
|
23 | | -## Using an entity picker |
| 29 | +## Using an Entity Picker |
24 | 30 |
|
25 | | -Using the entity picker should be pretty familiar as it aims to mimic the content picker as closely as possible. |
| 31 | +The entity picker functions similarly to the content picker. |
26 | 32 |
|
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. |
| 33 | +To pick an entity, follow these steps: |
28 | 34 |
|
29 | | - |
| 35 | +1. Go to the Document Type where the entity picker Data Type is added. |
| 36 | +2. Click **Add** to open the picker dialog, displaying a paginated list of entities. |
| 37 | +3. *[Optional]* If searchable fields are configured, use the search input field to filter results. |
30 | 38 |
|
31 | | -To pick your items click on the entity names and then click 'Select' in the bottom right-hand corner. |
| 39 | + |
32 | 40 |
|
33 | | -The picker should display a summary of the selected entities which can be sorted by dragging the selected entities into the desired order. |
| 41 | +4. Click on the entity names. |
| 42 | +5. Click **Submit**. |
| 43 | + The picker displays a summary of selected entities, which can be reordered by dragging them. |
| 44 | +6. Click **Save** or **Save and publish** to save the changes. |
34 | 45 |
|
35 | 46 |  |
36 | 47 |
|
37 | | -To save the value either **save** or **save and publish** the current document. |
| 48 | +## Retrieving the Value of an Entity Picker |
38 | 49 |
|
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. |
| 50 | +The entity picker property editor includes a built-in [value converter](https://docs.umbraco.com/umbraco-cms/extending/property-editors/property-value-converters/). Retrieving the property value from Umbraco returns the selected entities, converting them to the relevant type. |
42 | 51 |
|
43 | 52 | ````csharp |
44 | 53 | // Example |
|
0 commit comments