---
title: Single or multiple list options
slug: cms-11/dev-docs/single-or-multiple-list-options
docTags: 
createdAt: 2026-07-22T19:45:22.987Z
---

You can set up single or multiple selections from a list of predefined values by using the `SelectOne` and `SelectMany` attributes, located in the `EPiServer.Shell.ObjectEditing` namespace in the `EPiServer.UI` assembly. You can define these attributes on a property and require a reference to a class implementing the `ISelectionFactory `interface:

```csharp
[ContentType]
public class SamplePage: PageData {
  [SelectOne(SelectionFactoryType = typeof (LanguageSelectionFactory))]
  public virtual string SingleLanguage {
    get;
    set;
  }

  [SelectMany(SelectionFactoryType = typeof (LanguageSelectionFactory))]
  public virtual string MultipleLanguage {
    get;
    set;
  }
}

public class LanguageSelectionFactory: ISelectionFactory {
  public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) {
    return new ISelectItem[] {
      new SelectItem() {
        Text = "English", Value = "EN"
      }, new SelectItem() {
        Text = "Swahili", Value = "SW"
      }, new SelectItem() {
        Text = "French Polonesia", Value = "PF"
      }
    };
  }
}
```

The result looks something like the following image:

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/xnA-diy0Wy6-QgL1eCXrl-20260722-194634.png "selectionfactory.png")

## Create attributes

You should follow the DRY (*Don't Repeat Yourself*) principle and avoid adding references to the selection factory in many attributes by creating an attribute, if you use them in several places. Inherit from the `EPiServer` attributes and override the `SelectionFactoryType` property as shown in the following example:

```csharp
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class LanguageSelectionAttribute: SelectOneAttribute {
  public override Type SelectionFactoryType {
    get {
      return typeof (LanguageSelectionFactory);
    }
    set {
      base.SelectionFactoryType = value;
    }
  }
}
```
