Class ContentAreaItem
The model for item that will be rendered in a ContentArea.
Inheritance
Inherited Members
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 9.12.2Syntax
public class ContentAreaItem : IContentGroup, IRenderSettings
Constructors
ContentAreaItem()
Initializes a new instance of the ContentAreaItem class.
Declaration
public ContentAreaItem()
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'.")]
public virtual DisplayOption DisplayOption { get; set; }
Property Value
Type | Description |
---|---|
DisplayOption |
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.