Click or drag to resize

ISiteCrossLocaleCopyPage Method


Copies a Page with language settings, together with its descendants, to another location of a Page with language settings, when there is a Lingual Map established between the Region Roots of both Pages .

This method will create a collection of Lingual Maps from the source Page and its descendants, to their corresponding clone Pages.

Namespace:  Ingeniux.CMS
Assembly:  Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.308
Syntax
IEnumerable<ILingualPageMap> CrossLocaleCopyPage(
	IPage page,
	IPage parent,
	EnumCopyActions placing,
	bool ignoreExistingMaps = false,
	bool includeDescendants = true
)

Parameters

page
Type: Ingeniux.CMSIPage
The Page to be copied
parent
Type: Ingeniux.CMSIPage
The target location
placing
Type: Ingeniux.CMS.EnumsEnumCopyActions
The location to place the copied Pages relative to the "parent"
ignoreExistingMaps (Optional)
Type: SystemBoolean
Whether to ignore any existing Lingual Map of the source Page that was already mapped to to the "parent"'s Locale. If true, system will remove the existing map silently before creating a new one. If not, a error will be thrown.
includeDescendants (Optional)
Type: SystemBoolean

[Missing <param name="includeDescendants"/> documentation for "M:Ingeniux.CMS.ISite.CrossLocaleCopyPage(Ingeniux.CMS.IPage,Ingeniux.CMS.IPage,Ingeniux.CMS.Enums.EnumCopyActions,System.Boolean,System.Boolean)"]

Return Value

Type: IEnumerableILingualPageMap
The new Lingual Map between the source Page and its copied Page at target location
Exceptions
ExceptionCondition
ArgumentNullExceptionWhen the parameter "page" or "parentPage" is null, or "parentPage" being Root of the Site, and the "placing" is to a sibling position.
ArgumentExceptionWhen "page" or "parentPage" doesn't have valid Hierarchy value.
InvalidOperationException When "page" is either Root Page or Recycle Folder; Or when the Region Roots of "page" and "parentPage" don't have established Lingual Map yet.
SecurityExceptionWhen Operating User doesn't have the necessary node-level permssions. The Operating User must have at least read-only permission on "page", and full access on the actual target parent Page.
Remarks

This method is for strictly copying Pages between lingual sections that already have their Region Roots mapped. Failure to meet this condition will generate errors.

When "ignoreExistingMaps" is true, system to silently remove any Lingual Map that source Page has at target Locale.

When "ignoreExistingMaps" is false, error will be thrown.

Four events are fired in the following order: BeforeCrossLocaleCopy, BeforePageCopy, AfterPageCopy, and AfterCrossLocaleCopy.

See Also