Table of Contents

Class Page

Namespace
Dynamicweb.Content
Assembly
Dynamicweb.dll

The Page class models the concept of a webpage

public class Page : Entity<int>, IChangeTracking, IDisplayName, IPermissionEntity, IPermissionEntityLookup
Inheritance
Page
Implements
Inherited Members
Extension Methods

Constructors

Page()

Private constructor for the sake of supporting xml serialization. :(

public Page()

Page(int)

Initializes a new instance of the Page class with the specified area id indicating to which website this is a part of

public Page(int areaId)

Parameters

areaId int

The id of the area (website) to which this page belongs

Page(int, int)

Initializes a new instance of the Page class with the provided arguments

public Page(int areaId, int parentPageID)

Parameters

areaId int

The id of the area (website) to which this page belongs

parentPageID int

The id of the page that is the parent page of this new instance

Properties

Active

Gets or sets a value indicating whether this Page is active. Active in this case means "Show in menu" and that the page can be seen in the frontend and should be displayed in navigation. It is not to be confused with "Hidden" property which means that the page is unpublished. See ShowInMenu

public bool Active { get; set; }

Property Value

bool

true if active; otherwise, false.

ActiveFrom

Gets or sets the active from.

public DateTime ActiveFrom { get; set; }

Property Value

DateTime

The active from.

ActiveTo

Gets or sets the active to.

public DateTime ActiveTo { get; set; }

Property Value

DateTime

The active to.

Allowclick

Gets or sets a value indicating whether this Page is clickable in navigations.

public bool Allowclick { get; set; }

Property Value

bool

true if allowed; otherwise, false.

Allowsearch

Gets or sets a value indicating whether this Page is searchable.

public bool Allowsearch { get; set; }

Property Value

bool

true if searchable; otherwise, false.

ApprovalState

Gets or sets the state of the approval.

public int ApprovalState { get; set; }

Property Value

int

The state of the approval.

ApprovalStep

Gets or sets the approval step.

public int ApprovalStep { get; set; }

Property Value

int

The approval step.

ApprovalType

Gets or sets the type of the approval.

public int ApprovalType { get; set; }

Property Value

int

The type of the approval.

Remarks

-2 = Draft, -1 = versions, 0 = normal, >0 = Some workflow

Area

Gets the area.

public Area Area { get; }

Property Value

Area

The area.

AreaId

Gets or sets the area ID.

public int AreaId { get; set; }

Property Value

int

The area ID.

ColorSchemeId

The id of the color scheme ColorScheme.

public string ColorSchemeId { get; set; }

Property Value

string

ContentType

Gets or sets the content type.

public string ContentType { get; set; }

Property Value

string

CopyOf

Gets or sets the id of the page for which this is a copy of

public int CopyOf { get; set; }

Property Value

int

a value indicating the id of the page for which this is a copy

CreationRules

Gets or sets collection of creation rules metadata collection.

public CreationRuleMetadataCollection CreationRules { get; set; }

Property Value

CreationRuleMetadataCollection

Description

Gets or sets the description.

public string Description { get; set; }

Property Value

string

The description.

DisplayMode

Gets or sets the page display mode.

public DisplayMode DisplayMode { get; set; }

Property Value

DisplayMode

ExactUrl

Gets or sets the exact URL for page.

public string ExactUrl { get; set; }

Property Value

string

The page exact URL.

ForIntegration

public bool ForIntegration { get; set; }

Property Value

bool

HasExperiment

Gets or sets a value indicating whether this page has aexperiment associated with it.

public bool HasExperiment { get; set; }

Property Value

bool

true if this instance has an experiment; otherwise, false.

Hidden

Gets or sets a value indicating whether this Page is hidden. Hidden in this case means "Inactive" and that the page cannot be seen in the frontend. It is not to be confused with "Hidden in menu" which is handled by the Active property

public bool Hidden { get; set; }

Property Value

bool

true if hidden; otherwise, false.

HideForDesktops

Gets or sets a value indicating whether this page should be hidden for desktops in navigation - that is devices not detected as phone or tablet.

public bool HideForDesktops { get; set; }

Property Value

bool

true if hide for desktops; otherwise, false.

HideForPhones

Gets or sets a value indicating whether this page should be hidden for phones in navigation.

public bool HideForPhones { get; set; }

Property Value

bool

true if hide for phones; otherwise, false.

HideForTablets

Gets or sets a value indicating whether this page should be hidden for tablets in navigation.

public bool HideForTablets { get; set; }

Property Value

bool

true if hide for tablets; otherwise, false.

IsFolder

Gets or sets a value indicating whether this page is a folder.

public bool IsFolder { get; set; }

Property Value

bool

true if this instance is folder; otherwise, false.

IsLanguage

Gets a value indicating whether this instance is language.

public bool IsLanguage { get; }

Property Value

bool

true if this instance is language; otherwise, false.

IsLockedByMaster

public bool IsLockedByMaster { get; }

Property Value

bool

IsMaster

Gets a value indicating whether this instance is master.

public bool IsMaster { get; }

Property Value

bool

true if this instance is master; otherwise, false.

IsTemplate

Gets or sets a value indicating whether this instance is template.

public bool IsTemplate { get; set; }

Property Value

bool

true if this instance is template; otherwise, false.

IsTemplateFolder

Gets a value indicating whether this instance is template folder.

public bool IsTemplateFolder { get; }

Property Value

bool

true if this instance is template folder; otherwise, false.

Item

Gets the associated item.

public Item Item { get; }

Property Value

Item

ItemId

Gets or sets the id of the associated item.

public string ItemId { get; set; }

Property Value

string

The item identifier e.g. ITEM1.

ItemType

Gets or sets the type of the item associated with the page. The systemname as a representation of underlying ItemType

public string ItemType { get; set; }

Property Value

string

The type of the item e.g. "Page" .

Keywords

Gets or sets the keywords.

public string Keywords { get; set; }

Property Value

string

The keywords.

Languages

Gets the language versions of the page.

public PageCollection Languages { get; }

Property Value

PageCollection

The languages. Returns

null
(Nothing in Visual Basic) if the page is not a master.

Layout

Gets the layout.

public Layout Layout { get; }

Property Value

Layout

The layout.

LayoutApplyToSubPages

Gets or sets a value indicating whether layout template applies to sub pages.

public bool LayoutApplyToSubPages { get; set; }

Property Value

bool

true if layout applies to sub pages; otherwise, false.

LayoutTemplate

Gets or sets the layout template.

public string LayoutTemplate { get; set; }

Property Value

string

The layout template.

Level

public int Level { get; }

Property Value

int

MasterPage

Gets the master page when the page is a lanugage.

public Page MasterPage { get; }

Property Value

Page

The master page.

MasterPageEditTime

Gets the master page edit time.

public DateTime MasterPageEditTime { get; }

Property Value

DateTime

The master page edit time.

MasterPageId

Gets or sets the master page ID.

public int MasterPageId { get; set; }

Property Value

int

The master page ID.

MasterType

Gets or sets the type of the master.

public MasterType MasterType { get; set; }

Property Value

MasterType

The type of the master. Only has an affect on master paragraphs

MenuText

Gets or sets the menu text. This is the name of the page and is used in the navigation.

public string MenuText { get; set; }

Property Value

string

The menu text e.g. "Page1"

MetaCanonical

Gets or sets the page canonical url.

public string MetaCanonical { get; set; }

Property Value

string

The canonical url.

MetaTitle

Gets or sets the meta title.

public string MetaTitle { get; set; }

Property Value

string

The meta title.

NavigationSettings

Gets or sets the navigation settings.

public PageNavigationSettings NavigationSettings { get; set; }

Property Value

PageNavigationSettings

The navigation settings.

NavigationTag

Gets or sets the navigation tag used for referencing navigation by tag instead of ID.

public string NavigationTag { get; set; }

Property Value

string

The navigation tag.

Nofollow

If set, will nofollow meta tag to the page: <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">

public bool Nofollow { get; set; }

Property Value

bool

boolean flag

Noindex

If set, will add noindex meta tag to the page: <META NAME="ROBOTS" CONTENT="NOINDEX">

public bool Noindex { get; set; }

Property Value

bool

boolean flag

Parent

Gets or sets the parent.

public Page Parent { get; }

Property Value

Page

The parent.

ParentLayoutTemplate

Gets the parent layout template if the parent template is applied to sub pages.

public string ParentLayoutTemplate { get; }

Property Value

string

The parent layout template.

ParentPageId

Gets or sets the parent page ID.

public int ParentPageId { get; set; }

Property Value

int

The parent page ID.

PermissionTemplate

Gets or sets the permission template.

public string PermissionTemplate { get; set; }

Property Value

string

The permission template.

PermissionType

Gets or sets the type of the permission.

public int PermissionType { get; set; }

Property Value

int

The type of the permission.

PropertyItem

Gets the associated property item.

public Item PropertyItem { get; }

Property Value

Item

PropertyItemId

Gets or sets the id of the associated property item.

public string PropertyItemId { get; set; }

Property Value

string

The property item identifier i.e. "ITEM1".

Published

Determines whether the page is published taking active period into consideration.

public bool Published { get; }

Property Value

bool

true if the page is published and current time is within the active period; otherwise, false.

Robots404

If set, will return 404 error when known robot tries to request this page

public bool Robots404 { get; set; }

Property Value

bool

boolean flag

ShortCut

Gets or sets the short cut.

public string ShortCut { get; set; }

Property Value

string

The short cut.

ShowInLegend

Gets or sets a value indicating whether to show in legend.

public bool ShowInLegend { get; set; }

Property Value

bool

true if shown in legend; otherwise, false.

ShowInMenu

Gets a value indicating if the current page should be hidden in the menu. Page setting in UI 'Published': Page.Active = true, Page.Hidden = false (ShowInMenu = True) Page setting in UI 'Hide in menu': Page.Active = false, Page.Hidden = false (ShowInMenu = False) Page setting in UI 'Unpublished': Page.Active = false, Page.Hidden = true (ShowInMenu = False)

public bool ShowInMenu { get; }

Property Value

bool

ShowInSitemap

Gets or sets a value indicating whether page is showed in sitemap.

public bool ShowInSitemap { get; set; }

Property Value

bool

true if shown in sitemap; otherwise, false.

ShowUpdateDate

Gets or sets a value indicating whether to show the page update date.

public bool ShowUpdateDate { get; set; }

Property Value

bool

true if showing the update date; otherwise, false.

Sort

Gets or sets the sort.

public int Sort { get; set; }

Property Value

int

The sort.

SslMode

Gets or sets a value indicating SSLMode

public int SslMode { get; set; }

Property Value

int

1 Standard, 2 Force SSL, 3 Un-force SSL

TemplateDescription

Gets or sets the template description.

public string TemplateDescription { get; set; }

Property Value

string

The template description.

TemplateImage

Gets or sets the template image

public string TemplateImage { get; set; }

Property Value

string

The template image.

TopImage

Gets or sets the top image.

public string TopImage { get; set; }

Property Value

string

The top image.

TopLevelIntegration

public bool TopLevelIntegration { get; set; }

Property Value

bool

TreeSection

Gets or sets the tree section. Text box to set this value is only visible if ParentPageId is 0.

public string TreeSection { get; set; }

Property Value

string

The tree section.

UniqueId

public Guid UniqueId { get; set; }

Property Value

Guid

UrlDataProviderParameters

Gets or sets the URL data provider parameters

public string UrlDataProviderParameters { get; set; }

Property Value

string

UrlDataProviderTypeName

Gets or sets the URL data provider type name

public string UrlDataProviderTypeName { get; set; }

Property Value

string

UrlIgnoreForChildren

Gets or sets wether the name of this page should be part of the URL for subpages when using the 'path' URL schema.

public bool UrlIgnoreForChildren { get; set; }

Property Value

bool

Boolean indicating if the name should be ignored.

UrlName

Gets or sets the name in the URL.

public string UrlName { get; set; }

Property Value

string

The name in the URL.

UrlUseAsWritten

Gets or sets wether the UrlName of this page should be used as the URL exactly as typed when using the 'path' URL schema.

public bool UrlUseAsWritten { get; set; }

Property Value

bool

Boolean indicating if the UrlName should be used exactly as typed for the URL.

UsesLayout

Gets a value indicating whether page uses layout.

public bool UsesLayout { get; }

Property Value

bool

true if page uses layout; otherwise, false.

Methods

Copy()

Creates a copy of this page and returns it as a transient instance (Not persisted)

public Page Copy()

Returns

Page

A new Page instance with state copied from this Page instance

GetBreadcrumbPath()

Gets the path from the root to this page expressed as /menuText1/menuTextN/MenuTextN+1

public string GetBreadcrumbPath()

Returns

string

A string representing the path to this page instance

GetDisplayName()

Yields a human-readable name for rendering.

public string GetDisplayName()

Returns

string

name

GetInheritedPermissionTemplate()

public string GetInheritedPermissionTemplate()

Returns

string

GetLanguageVersion(int)

Gets the language version of this page as specified with the areaId parameter

public Page GetLanguageVersion(int areaId)

Parameters

areaId int

The language version to get

Returns

Page

A page language version as specified in the areaId

GetPageHrefValue()

Gets the page href value for links based on shortcut settings.

public string GetPageHrefValue()

Returns

string

For normal pages, returns Default.aspx?ID={Page.ID}.

Remarks

If the page has a shortcut that will be returned if it is marked as redirect or the shortcut is an external link, mail etc.

GetPath()

Gets the path from the root page to this page as a list of pages.

public IList<Page> GetPath()

Returns

IList<Page>

A list of pages in the path from the root page to this page instance.

MarkAsModified()

public void MarkAsModified()

Publish()

public void Publish()

ResetUrlChangeTracking()

Resets the change tracker for the url.

public void ResetUrlChangeTracking()

SetHidden()

Sets the hidden state.

public void SetHidden()

UnPublish()

public void UnPublish()
To top