Class PropertyContentReferenceControl
Property control that is used to store a reference to a page in the web site.
Inheritance
System.Object
PropertyContentReferenceControl
Inherited Members
Namespace: EPiServer.Web.PropertyControls
Assembly: EPiServer.dll
Version: 9.12.2Syntax
public class PropertyContentReferenceControl : PropertyDataControl, IPropertyControl, INamingContainer, IRenderSettings
Constructors
PropertyContentReferenceControl()
Declaration
public PropertyContentReferenceControl()
Properties
ContentLink
Gets or sets the ContentReference.
Declaration
public virtual ContentReference ContentLink { get; set; }
Property Value
Type | Description |
---|---|
ContentReference | The ContentReference. |
ContentRepository
Gets or sets the page repository that should be used by the current instance.
Declaration
public Injected<IContentRepository> ContentRepository { get; set; }
Property Value
Type | Description |
---|---|
Injected<IContentRepository> |
PropertyContentReference
Gets or sets the PropertyPageReference.
Declaration
public PropertyContentReference PropertyContentReference { get; set; }
Property Value
Type | Description |
---|---|
PropertyContentReference |
Methods
CreateDefaultControls()
Creates the default controls for the property. Used when the property is in view mode or in "on page edit" mode and the PropertyDataControl does not support on page editing.
Declaration
public override void CreateDefaultControls()
Overrides
TryGetContent()
Will try to get the page referenced in PageLink from the PageSource if it is set, else from the IPageRepository. If the page doesn't exist an exception will be caught and null will be returned.
Declaration
protected virtual IContent TryGetContent()
Returns
Type | Description |
---|---|
IContent | The page referenced by PageLink if it exists; else null. |
Implements
System.Web.UI.INamingContainer