Class DisplayOptions
Service that is used to register Display
Inheritance
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[Options(ConfigurationSection = "Cms")]
public class DisplayOptions : Object, IEnumerable<DisplayOption>, IEnumerable
Remarks
Display options are returned in the order they were added when enumerating over this class.
Constructors
DisplayOptions()
Initializes a new instance of the Display
Declaration
public DisplayOptions()
Methods
Add(DisplayOption)
Add a display option
Declaration
public virtual DisplayOptions Add(DisplayOption displayOption)
Parameters
Type | Name | Description |
---|---|---|
Display |
displayOption | The display option to add |
Returns
Type | Description |
---|---|
Display |
Exceptions
Type | Condition |
---|---|
System. |
Thrown if the display options is null |
System. |
A display option with the same id allready exists |
Add(String, String, String)
Add a new display option
Declaration
public virtual DisplayOptions Add(string id, string name, string tag)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | Unique identifier for the option |
System. |
name | Name of the display option to add, if a language resource key is specified it will be automatically translated |
System. |
tag | The template tag to apply when the option has been selected |
Returns
Type | Description |
---|---|
Display |
Add(String, String, String, String)
Add a new display option
Declaration
public virtual DisplayOptions Add(string id, string name, string tag, string description)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | Unique identifier for the option |
System. |
name | Name of the display option to add, if a language resource key is specified it will be automatically translated |
System. |
tag | The rendering tag to apply when the option has been selected |
System. |
description | Description for the option |
Returns
Type | Description |
---|---|
Display |
Add(String, String, String, String, String)
Add a new display option
Declaration
public virtual DisplayOptions Add(string id, string name, string tag, string description, string iconClass)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | Unique identifier for the option |
System. |
name | Name of the display option to add, if a language resource key is specified it will be automatically translated |
System. |
tag | The rendering tag to apply when the option has been selected |
System. |
description | Description for the option |
System. |
iconClass | Css class for the icon that is used in the display option selector |
Returns
Type | Description |
---|---|
Display |
Get(String)
Gets the display options with the specified id
Declaration
public virtual DisplayOption Get(string id)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | The id if the option to get. |
Returns
Type | Description |
---|---|
Display |
Display |
GetEnumerator()
Declaration
public IEnumerator<DisplayOption> GetEnumerator()
Returns
Type | Description |
---|---|
System. |
Remove(String)
Removes the Display
Declaration
public virtual void Remove(string id)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | The id if the display option to remove. |