Class PreviewPage
Base class for previewing pages with capability to preview other content than pages by hosting it in another page
Inherited Members
Namespace: EPiServer
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7Syntax
public class PreviewPage : PageBase, IPageSource, ICurrentPage, ISupportsScriptManager, IContentSource
Remarks
Returns the start page as CurrentPage when hosting other content than pages, so IContent
Constructors
PreviewPage()
Initializes a new instance of Preview
Declaration
public PreviewPage()
PreviewPage(Int32)
Initializes a new instance of the Preview
Declaration
public PreviewPage(int options)
Parameters
Type | Name | Description |
---|---|---|
System. |
options | The page options to enable. |
Remarks
The options parameter is a bitmap constructed from the OptionFlag of Page plugin classes from the EPiServer.Web.PageExtensions namespace.
PreviewPage(Int32, Int32)
Initializes a new instance of the Preview
Declaration
public PreviewPage(int enable, int disable)
Parameters
Type | Name | Description |
---|---|---|
System. |
enable | The enable. |
System. |
disable | The disable. |
Properties
CurrentContentLink
Exposes the content link used to route to this web form
Declaration
public virtual ContentReference CurrentContentLink { get; set; }
Property Value
Type | Description |
---|---|
Content |
CurrentData
The data that is being previewed
Declaration
public IContent CurrentData { get; }
Property Value
Type | Description |
---|---|
IContent |
CurrentLoaderOptions
Gets the loader options used for Current
Declaration
protected virtual LoaderOptions CurrentLoaderOptions { get; }
Property Value
Type | Description |
---|---|
Loader |
CurrentPageLink
The current page, which if hosting a block is a the start page by default
Declaration
public override PageReference CurrentPageLink { get; set; }
Property Value
Type | Description |
---|---|
Page |
Overrides
Methods
GetHostPage()
Gets the page used for hosting when the content type is not a page itself
Declaration
protected virtual PageReference GetHostPage()
Returns
Type | Description |
---|---|
Page |
A page reference to use as default |
OnInit(EventArgs)
Declaration
protected override void OnInit(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System. |
e |
Overrides
SetupVisitorGroupImpersonation()
Declaration
protected override void SetupVisitorGroupImpersonation()
Overrides
ValidatePageTemplate()
Declaration
public override void ValidatePageTemplate()
Overrides
Explicit Interface Implementations
IContentSource.CurrentContent
Declaration
IContent IContentSource.CurrentContent { get; }
Returns
Type | Description |
---|---|
IContent |