Class EditPage
Base class for EPiServer pages that needs to register javascripts and/or CSS files.
Inherited Members
Namespace: EPiServer
Assembly: EPiServer.dll
Version: 10.10.4Syntax
public class EditPage : SimplePage, IPageSource, ICurrentPage, IContentSource, ISupportsScriptManager
Remarks
As TemplatePage inherits from EditPage, any attributes or methods defined for EditPage will be available for TemplatePage.
Constructors
EditPage()
Supports the internal infrastructure. Used to indicate that we are in the process of creating a new page rather than editing an existing page.
Declaration
public EditPage()
EditPage(Int32)
Initializes a new instance of the EditPage class.
Declaration
public EditPage(int options)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | 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.
EditPage(Int32, Int32)
Initializes a new instance of the EditPage class.
Declaration
public EditPage(int enable, int disable)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | enable | The enable. |
System.Int32 | disable | The disable. |
Methods
IsCssFileRegistered(String)
Determines if the client startup script is registered with the EditPage object.
Declaration
public bool IsCssFileRegistered(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path to the css file |
Returns
Type | Description |
---|---|
System.Boolean | True if the css file is registered; otherwise, false. |
IsScriptFileRegistered(String)
Determines if the client startup script is registered with the EditPage object.
Declaration
public bool IsScriptFileRegistered(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path to the script file |
Returns
Type | Description |
---|---|
System.Boolean | True if the script file is registered; otherwise, false. |
RegisterCssFile(String)
Registers a css file in the header of the html document.
Declaration
public bool RegisterCssFile(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path to the css file |
Returns
Type | Description |
---|---|
System.Boolean | True if the css file has been registrered or already is registered. False if no header node is found in the document. |
Remarks
The CSS file is shows up in a LINK element on the page when the page is rendered. Behind the scenes, the provided CSS path is used as a key for the registration.
RegisterScriptFile(String)
Registers a script file in the header of the html document.
Declaration
public bool RegisterScriptFile(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path to the script file |
Returns
Type | Description |
---|---|
System.Boolean | True if the script file has been registrered or already is registered. False if no header node is found in the document. |