Class ContentAreaItem
The model for item that will be rendered in a ContentArea.
Inheritance
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public class ContentAreaItem : Object, IContentGroup, IRenderSettings, IReadOnly<ContentAreaItem>, IReadOnlyConstructors
ContentAreaItem()
Initializes a new instance of the ContentAreaItem class.
Declaration
public ContentAreaItem()ContentAreaItem(ContentFragment)
Initializes a new instance of the ContentAreaItem class.
Declaration
public ContentAreaItem(ContentFragment fragment)Parameters
| Type | Name | Description | 
|---|---|---|
| ContentFragment | fragment | The inner fragment. | 
Properties
AllowedRoles
Gets or sets a collection of roles which this ContentAreaItem should be restricted to.
Declaration
public virtual IEnumerable<string> AllowedRoles { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Collections.Generic.IEnumerable<System.String> | 
ContentGroup
Gets or sets the content group that has been selected for this ContentAreaItem.
Declaration
public virtual string ContentGroup { get; set; }Property Value
| Type | Description | 
|---|---|
| System.String | 
ContentGuid
Gets or sets the content Guid.
Declaration
public virtual Guid ContentGuid { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Guid | The content Guid. | 
ContentLink
Gets or sets the content link.
Declaration
public virtual ContentReference ContentLink { get; set; }Property Value
| Type | Description | 
|---|---|
| ContentReference | The content link. | 
IsReadOnly
Gets a value indicating whether this instance is read only.
Declaration
public bool IsReadOnly { get; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
RenderSettings
Gets or sets a dictionary of key values that can be used to customize the rendering of the ContentAreaItem.
Declaration
public virtual IDictionary<string, object> RenderSettings { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Collections.Generic.IDictionary<System.String, System.Object> | 
Remarks
To set the display option of this ContentAreaItem, add an entry with the key ContentDisplayOptionAttributeName and the value being the id of the DisplayOption.
Methods
CreateWritableClone()
Creates the writable clone.
Declaration
public ContentAreaItem CreateWritableClone()Returns
| Type | Description | 
|---|---|
| ContentAreaItem | 
MakeReadOnly()
Makes this instance read only.
Declaration
public void MakeReadOnly()Explicit Interface Implementations
IReadOnly.CreateWritableClone()
Declaration
object IReadOnly.CreateWritableClone()Returns
| Type | Description | 
|---|---|
| System.Object | 
