Class ContentAreaItem
The model for item that will be rendered in a ContentArea.
Inheritance
Inherited Members
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 11.20.7Syntax
public class ContentAreaItem : IContentGroup, IRenderSettings, IReadOnly<ContentAreaItem>, IReadOnly
Constructors
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. |
DisplayOption
Gets or sets the DisplayOption that has been selected for this ContentAreaItem.
Declaration
[Obsolete("Load display option through DisplayOptions service using the id stored in the RenderSettings dictionary or use helper method LoadDisplayOption(). To set add the DisplayOption id to the RenderSettings with key 'data-epi-content-display-option'.", true)]
public virtual DisplayOption DisplayOption { get; set; }
Property Value
Type | Description |
---|---|
DisplayOption |
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 |