sitecoresitecore7sitecore7.2

Using a bucket as a datasource for a droplink/tree field


I'm trying to enable content editors to select an item that resides in a bucket in a droplink field but I'm unable to find a field type/datasource that enables this.

I need to allow the user to select a single item (so not a multilist), the items are in a bucket as the number of items may be huge and the search api would be most helpful to the editors.

Is there a field or datasource query that will enable a lookup field to select a single bucketed item?


Solution

  • The simplest solution is to use a Sitecore multilist with search field.

    First you need to set the source of your field to display items within your bucket of a specific template(s).

    Example: StartSearchLocation={11111111-1111-1111-1111-111111111111}&Filter=+_templatename:sample item

    Here is an article describing how to set the source of your field: Sitecore 7 field types

    If you need to limit the selection to one item then you need to also apply some regex. To achieve this you need to enable standards values in the view tab so you can alter the data section.

    In the data section add the following regex: ^({[^}]+}\|?){0,1}$ and add some validation text.

    Example: enter image description here

    This article provides additional infromation:Limit selected items on Sitecore multilist field