Pages in Sitefinity works with the following interfaces:
Following is a description of the interfaces and their members:
IPageBase Members
This interface is the most rudimentary interface for pages and templates. All pages and templates implement this interface.
| Member name |
Member type |
Comments |
| ID |
Guid |
Readonly. Unique ID of the page. |
| LangID |
int |
Readonly. Culture identifier for the page content. |
| CmsProvider |
CmsProvider |
Readonly. CmsProvider that implements data related operations. |
IPageContent Members
This interface implements IPageBase interface and extends it to represent a web content (theme, template, controls).
| Member name |
Member type |
Comments |
| Version |
int |
History version number of the page. |
| Theme |
string |
The name of the theme the page uses. |
| MasterPage |
string |
MasterPage used by the page. |
| Template |
IPageTemplate |
Get or set the staged page template. If derived class is IPageTemplate, this property is null. |
| Controls |
IList<ICmsWebControl> |
Readonly. Get all controls of the page. |
IPage Members
This interface represents the common functionalities of Sitefinity pages and Sitefinity templates, since both pages and templates implement this interface.
| Member name |
Member type |
Comments |
| Name |
string |
The name of the page used to generate the URL of the page. |
| Status |
PageStatus |
Represents status of the page. PageStatus is an enumeration which consists of the following possibilities:
|
| DateCreated |
DateTime |
Date of creation of the page. |
| DateModified |
DateTime |
Date of last modification of the page. |
| Staged |
IStagedPage |
Staged version of the page. |
| GetVersion(int version) |
IStagedPage |
Get a staged version of the specific version. |
| GetAllHistory() |
IList<IStagedPage> |
Get a list of all versions of a page. |
| GetHistory(int from, int maxRows, out int totalRows) |
IList<IStagedPage> |
Get a certain number of page versions. Used primarily for paging purposes.
|
| HeaderControls |
IList |
Readonly. Gets a list of all header controls assigned to a page. |
| AddHeaderControl(Control control) |
IHeaderControl |
Receives control and transfers it to IHeaderControl. This control is then added to HeaderControls of the page. |
| DeleteAllHeaderControl() |
void |
Deletes all header controls of the page. |
| ContainsUrlSrvc |
bool |
Readonly. Returns true if page contains any controls that contain URL rewriting service. |
| GetRewriterServices() |
Type[] |
Return an array of URL rewriting services types that exist in controls on the page. |
ICmsPage Members
This interface represents a Sitefinity page object.
| Member name |
Member type |
Comments |
| MenuName |
string |
Name of the page as it will appear in Sitemap bound navigation. |
| Description |
string |
Page description which fills the head description meta tag. |
| Title |
string |
Title of the page as it will appear in the browser title bar. |
| Keywords |
string |
Page keywords which fill the head keywords meta tag. |
| Navigable |
bool |
Determines whether the page should be visible in the navigation. |
| StaticUrl |
string |
Page URL built by Sitefinity. |
| DefaultUrl |
ICmsUrl |
Default Page URL. |
| DefaultUrlIndex |
short |
When multiple URLs are used by one page, this index determines which of the them is the default one. |
| DenyAnonymous |
bool |
Determines whether the page access is restricted to the users that are not logged in. |
| RequireCaching |
bool |
Determines whether the page will use caching or not. |
| DenyIndexing |
bool |
Determines whether the page should be indexed or not. |
| Parent |
ICmsPage |
Parent page of the current page. |
| ParentID |
Guid |
ID of the parent page of the current page. |
| Ordinal |
int |
Represents the page’s position in the Sitemap hierarchy. The smaller the number, the higher in the hierarchy the page is. |
| RequireSSL |
bool |
Determines whether this page will need secure socket connection (HTTPS). |
| Urls |
IList |
Gets the list of all URLs defined for this page. Remember that pages in Sitefinity can have multiple URLs. |
| ExternalUrl |
string |
If page is of "External page" type, this value determines the URL of the external page (such as http://www.sitefinity.com) |
| PageType |
CmsPageType |
Determines the type of the page. CmsPageType is an enumeration which consists of the following possibilities:
|
| LanguageVersions |
IDictionary<int, IPageContent> |
Gets all the language versions defined for a page. |
| HasCurrentLanguageVersion |
bool |
Determines whether the language version for the current culture exists. |
| DeleteLanguageVersion(IPageContent langVersion) |
void |
Deletes the specified language version. |
| GetUrls() |
IList<ICmsUrl> |
Gets a list of all URLs defined for this page. |
| AddUrl(string url, string queryString) |
ICmsUrl |
Adds a URL and query string to the page. Returns the combined URL and query string added to the page. |
| DeleteUrl(ICmsUrl url) |
void |
Deletes specified URL of the page. Remember that Sitefinity pages support multiple URLs. |
| DeleteAllUrls() |
void |
Deletes all URLs of the page. |
| Publish() |
void |
Publishes the current staged version of the page. |
| Archive() |
void |
Changes the status of the page to "Archived". |
| WorkflowID |
Guid |
Gets the workflow ID of this page. |
| GetWorkflow() |
Telerik.Workflow.WorkflowInstance |
Gets the workflow instance for this page. |
IPageTemplate Members
This is a marker interface and contains no members on its own. The interface represents Sitefinity template.
IStagedPage Members
This interface represents the Sitefinity page as a single unit, unlike ICmsPage which represents page as a part of Sitemap.
| Member name |
Member type |
Comments |
| IsCheckedOut |
bool |
Determines whether page or template is checked out for editing. |
| Locked |
bool |
Determines whether page or template is locked by user. |
| Modifier |
string |
User that is modifiying the page or template. |
| DateModified |
DateTime |
Date of last modification of page or template. |
| Parent |
IPage |
Page or template to which the staged version corresponds. |
| Rollback() |
void |
Rollbacks (returns to previous version) all changes made to the page or template. |
| CheckIn() |
void |
Checks in the page or template. |
| CheckOut() |
IStagedPage |
Checks out the page or template for editing. |
| UndoCheckOut() |
void |
Undoes the checkout operation. All changes made to the page or template will be lost. |
| MoveControl(ICmsWebControl control, string containerId, int ordinal) |
void |
Moves ICmsWebControl to a specified container and in specified order.
|
| MoveControl(Guid id, string containerId, int ordinal) |
void |
Moves ICmsWebControl to a specified container and in specified order. |
| AddControl(string containerId, string url, string controlId) |
void |
Adds user control to specified container for a specified URL.
|
| AddControl(string containerId, System.Web.UI.Control control) |
void |
Adds control to specified container. |
| AddControl(string containerId, Type type, int ordinal, string controlId) |
void |
Adds control specified by type to container in defined position.
|
| AddControl(string containerId, string url, int ordinal, string controlId) |
void |
Adds user control in container in defined position. |
| AddControl(string containerId, ICmsWebControl cmsControl, int ordinal) |
void |
Adds ICmsWebControl in container in a specified position.
|
| AddControl(string containerId, ICmsWebControl cmsControl) |
void |
Adds control in container.
|
| AddControl(string containerId, Type type, string controlId) |
void |
Adds control specified by type in container.
|
| RemoveControl(ICmsWebControl control) |
void |
Removes specified ICmsWebControl. |
| RemoveControl(Guid id) |
void |
Removes control specified by ID. |
| SetTemplate(Guid templateId, string theme) |
void |
Sets page template and theme for the staged page. |
| CopyFromLanguage(int langID) |
void |
Copies the content (controls, template, theme) of the current page version from the the content from another page version. |
IWebControlBase Members
This interface represents Sitefinity controls.
| Member name |
Member type |
Comments |
| ControlType |
Type |
Gets or sets the type of the control. |
| ID |
Guid |
Gets or sets the unique ID of the control. |
| IsAscx |
bool |
Determines whether the control is User Control. |
| ItemType |
string |
Gets or sets the type of the inheriting member. |
| TypeName |
string |
Gets or sets the string representation of the control type. |
| PropertiesToPersist |
IList<string> |
List of all properties that control needs to persist in order to be able to instantiate the correct instance of itself at a later time. |
| LoadControl(System.Web.UI.TemplateControl template) |
Control |
Loads the control in a specified template.
|
| LoadControl() |
Control |
Loads control instance if the control is custom. Throws error for user control. |
| SetControl(System.Web.UI.Control ctrl) |
void |
Preserves information for provided control. |
ICmsControlProperty Members
This interface represents a property of a Sitefinity control.
| Member name |
Member type |
Comments |
| ControlID |
Guid |
Unique ID of the control to which this property belongs. |
| Name |
string |
Gets or sets the name of the property. |
| Parent |
IWebControlBase |
Gets the control to which this property belongs. |
| ParentName |
string |
The name of the control to which this property belongs. |
| Value |
string |
The value of the property. Notice that type of the property value is string! |
See Also