Table of Contents

Interface IPageService

Namespace
Dynamicweb.Content
Assembly
Dynamicweb.dll
The IPageService interface defines operations for working with the Page Aggregate
[Obsolete("Use PageService instead.")]
public interface IPageService

Methods

ClearCache()

Clear page cache
void ClearCache()

ClearCache(IEnumerable<int>)

Clear page cache
void ClearCache(IEnumerable<int> pageIds)

Parameters

pageIds IEnumerable<int>
A collection of page ids for which to clear the cache

CopyTo(CopyPageInfo)

Creates a copy of a given Page
ApplicationResponse<Page> CopyTo(CopyPageInfo copyPageInfo)

Parameters

copyPageInfo CopyPageInfo
A CopyPageInfo instance providing information about how to perform the actual copy operation

Returns

ApplicationResponse<Page>
A response indicating the success or failure of the operation

CreateFromMaster(int, int)

Creates a new language version of the page with the specified id
int CreateFromMaster(int masterPageId, int languageAreaId)

Parameters

masterPageId int
The id of the page acting as master
languageAreaId int
The language version of the website on which to create the new page

Returns

int
The id of the new page

DeleteAllAreaPages(Area)

Deletes all pages in the specified area
ApplicationResponse DeleteAllAreaPages(Area area)

Parameters

area Area
The area for which to delete all pages

Returns

ApplicationResponse

DeletePage(int)

Deletes the specified page
void DeletePage(int pageId)

Parameters

pageId int
The id of the page to delete

ForceRefreshIndex(int)

Forces the specific item from the index to be force-refreshed from the repository.
bool ForceRefreshIndex(int id)

Parameters

id int
Id of element to be refreshed

Returns

bool
success

GetAncestors(int, bool)

Gets all ancestors pages
IEnumerable<Page> GetAncestors(int pageId, bool includingSelf)

Parameters

pageId int
includingSelf bool

Returns

IEnumerable<Page>
The page collection

GetAreaAndPageNameByUrl(string, ref string, ref string)

Gets the area and page name by URL.
string GetAreaAndPageNameByUrl(string url, ref string internalId, ref string internalAreaId)

Parameters

url string
The URL, i.e. Default.aspx?ID=123.
internalId string
Optional parameter by reference. If passed the ID of the page will be returned.
internalAreaId string
Optional parameter by reference. If passed the ID of the area will be returned.

Returns

string
The name of the area and page of the given link in the format "Area name: Page name"

GetAreaNavigationTree(int)

Gets a representation of the website and its pages in a PageTree instance
PageTree GetAreaNavigationTree(int areaId)

Parameters

areaId int
The id of the area for which to get its page navigation tree

Returns

PageTree
A PageTree instance

GetAvailablePageDefinitions(int, int)

Gets the collection of available page definitions for specified area .
IEnumerable<PageDefinition> GetAvailablePageDefinitions(int areaId, int parentPageId)

Parameters

areaId int
The area id.
parentPageId int
The parent page.

Returns

IEnumerable<PageDefinition>
IEnumerable(Of PageDefinition).

GetFirstActivePageForArea(int)

Gets the first active root page for the area with the specified id.
[Obsolete("Use GetFirstPageForArea instead.")]
Page GetFirstActivePageForArea(int areaId)

Parameters

areaId int
The id of the area for which to get the page

Returns

Page
The first active page for the specified area

GetFirstModulePageForArea(int, string)

Gets the first module page for the area with the specified id.
Page GetFirstModulePageForArea(int areaId, string moduleSystemName)

Parameters

areaId int
The id of the area for which to get the page.
moduleSystemName string
The system name of the module.

Returns

Page
Page.

GetFirstPageForArea(int)

Gets the first root page for the area with the specified id.
Page GetFirstPageForArea(int areaId)

Parameters

areaId int
The id of the area for which to get the page

Returns

Page
The first page for the specified area

GetLanguagePages(int)

Gets all language versions of the page with the specified id
PageCollection GetLanguagePages(int pageId)

Parameters

pageId int
The id of the page for which to get all its language versions

Returns

PageCollection
A list of pages

GetPage(int)

Gets the page with the specified id
Page GetPage(int pageId)

Parameters

pageId int
The id of the page to get

Returns

Page
The page with the specified id

GetPageByNavigationTag(int, string)

Gets the page with the specified navigation tag.
Page GetPageByNavigationTag(int areaId, string navigationTag)

Parameters

areaId int
The area identifier.
navigationTag string
The navigation tag.

Returns

Page
The first area page with the specified navigationtag

GetPageForItem(string, string)

Gets the page for the item with the specified type and id
Page GetPageForItem(string itemType, string itemId)

Parameters

itemType string
The itemType for which to find a page
itemId string
The itemId for which to find a page

Returns

Page
A page that has an associated item with the specified item type and id

GetPageIDByMasterID(int, int)

Gets the id of the page in the specified language version that has a master page with the given id
int GetPageIDByMasterID(int masterId, int languageAreaId)

Parameters

masterId int
The id of the master page
languageAreaId int
The language version of the page to get

Returns

int
A page id that has a master page with the specified id in the given language

GetPageNavigationTree(int)

Gets a representation of a subset of the website with the pages located under the page with the specified id
PageTree GetPageNavigationTree(int parentPageId)

Parameters

parentPageId int
The id of the page that will be the root page in the PageTree

Returns

PageTree
A PageTree instance

GetPages()

Gets all pages in the system
PageCollection GetPages()

Returns

PageCollection
A list with all the pages in the system

GetPages(int[])

Gets all the pages matching the ids in the specified array
PageCollection GetPages(int[] pageIds)

Parameters

pageIds int[]
An array of ids for which to get the page instances

Returns

PageCollection
A list with the pages matching the specified ids

GetPagesByAreaID(int)

Gets all the pages for the area with the specified id
PageCollection GetPagesByAreaID(int areaId)

Parameters

areaId int
The id of the area for which to get all its pages

Returns

PageCollection
A list of pages

GetPagesByParentID(int)

Gets all pages having the specified parent id
IEnumerable<Page> GetPagesByParentID(int parentId)

Parameters

parentId int
The parent id for which to get all children pages

Returns

IEnumerable<Page>
A list of pages all having a parent page with the specified id

GetPagesByTitle(string)

Gets all the pages that have the specified title
PageCollection GetPagesByTitle(string title)

Parameters

title string
The title fort which to get all pages having that as their title

Returns

PageCollection
A collection of pages with the specified titel

GetPagesForItems(IEnumerable<string>)

Gets a collection of pages having the specified item types
PageCollection GetPagesForItems(IEnumerable<string> itemTypes)

Parameters

itemTypes IEnumerable<string>
The item types for which to get pages

Returns

PageCollection
A collection of pages having the specified item types

GetPagesWithPermissions()

Gets all pages that have assigned permissions
IEnumerable<Page> GetPagesWithPermissions()

Returns

IEnumerable<Page>
A list of page instances that have permissions assigned

GetPageTemplatesForArea(int)

Gets all page templates for the specified area
PageCollection GetPageTemplatesForArea(int areaId)

Parameters

areaId int
The id of the area for which to get it's page templates

Returns

PageCollection
A collection of page templates

GetRootPagesForArea(int)

Gets all root pages for the area with the specified id
IEnumerable<Page> GetRootPagesForArea(int areaId)

Parameters

areaId int
The id of the area for which to get all its root pages

Returns

IEnumerable<Page>
A list of pages all being root to the area with the specified id

GetSolutionInfo()

Gets a SolutionInfo instance having general information about the entire solution
[Obsolete("Use GetWebpageCount instead.")]
SolutionInfo GetSolutionInfo()

Returns

SolutionInfo
A SolutionInfo instance having information about the entire solution

GetTemplateParentPage(int)

Get page template folder
Page GetTemplateParentPage(int areaId)

Parameters

areaId int
The area id.

Returns

Page
The page template folder

GetUpdatedLanguagePages(int)

Gets a list of pages for an area that has not been updated after their masters have been updated. The passed areaId has to be for an Area that is a language (has a master).
IEnumerable<Page> GetUpdatedLanguagePages(int areaId)

Parameters

areaId int
The area id for which to get the updated language pages

Returns

IEnumerable<Page>

GetWebpageCount()

Gets number of webpages on solution.
int GetWebpageCount()

Returns

int
webpageCount

GetWebpageCount(int)

Gets total number of webpages on specified area.
int GetWebpageCount(int areaId)

Parameters

areaId int
areaId

Returns

int
webpageCount

Move(int, int, int)

Moves the specified page to the target page and area
ApplicationResponse<Page> Move(int pageId, int destinationAreaId, int destinationPageId)

Parameters

pageId int
The id of the page to move
destinationAreaId int
Area to move to.
destinationPageId int
The id of the page to which the page should be moved

Returns

ApplicationResponse<Page>
The newly moved Paragraph

SaveAsTemplate(Page, string, string)

Saves the specified page as a template
int SaveAsTemplate(Page page, string name, string description)

Parameters

page Page
The page to save as a template
name string
The name of the new template
description string
A description of the template

Returns

int
The newly assigned page id for the template

SaveAsTemplate(Page, string, string, string)

Saves the specified page as a template
int SaveAsTemplate(Page page, string name, string description, string image)

Parameters

page Page
The page to save as a template
name string
The name of the new template
description string
A description of the template
image string
The image of the new template

Returns

int
The newly assigned page id for the template

SaveAsTemplate(Page, string, string, string, string)

Saves the specified page as a template
int SaveAsTemplate(Page page, string name, string description, string image, string category)

Parameters

page Page
The page to save as a template
name string
The name of the new template
description string
A description of the template
image string
The image of the new template
category string
A category of the template

Returns

int
The newly assigned page id for the template

SavePage(Page)

Saves the specified page to persistance
Page SavePage(Page page)

Parameters

page Page
The page to save

Returns

Page
The newly saved page

UpdatePagesOrder(int, int?, IEnumerable<int>)

Update order of childpages pages in navigation tree.
void UpdatePagesOrder(int areaId, int? pageId, IEnumerable<int> childPageIdsOrder)

Parameters

areaId int
The page area Id of the pageId
pageId int?
The page Id. if pageId is null or 0 the order of the top level pages hasbeen changed
childPageIdsOrder IEnumerable<int>
The collection of subpage ids with new pages order

UserHasAccessToAllBackendSubpages(Page, User)

Gets a value indicating if the user has access to all subpages in the specified page in the administration
bool UserHasAccessToAllBackendSubpages(Page page, User user)

Parameters

page Page
The page for which to determine if the user can access that and its subpages
user User
The user for whom to determine access

Returns

bool
True if the user can access the page and all of its subpages, otherwise false
To top