Clones a Region Root, together with its descendants, to another location. The cloned Page will also be a Region Root, with the specified language setting applied.
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: 9.0.565.0 (9.0.565)
IEnumerable<ILingualPageMap> CopyRegionRootPage( IPage page, IPage parent, EnumCopyActions placing, ILocale targetLocale )
Parameters
- page
- Type: Ingeniux.CMSIPage
The Region Root 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" - targetLocale
- Type: Ingeniux.CMSILocale
The language to set on the cloned Region Root
Return Value
Type: IEnumerableILingualPageMapThe new Lingual Map between the source Region Root and its clone Region Root at target location
Exception | Condition |
---|---|
ArgumentNullException | When the parameter "page" or "parentPage" is null, or "parentPage" being Root of the Site, and the "placing" is to a sibling position, or when "targetLocale" is null. |
ArgumentException | When "page" or "parentPage" doesn't have valid Hierarchy value, or when "page" is not Region Root, |
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. |
SecurityException | When 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. |
This method for for strictly copying a Page that is a Region Root. That means this Page must have a Locale, and must not Inheriting the Locale from its ancestor. Failure to meet this condition will generate errors.
Four events are fired in the following order: BeforeRegionRootCopy, BeforePageCopy, AfterPageCopy, and AfterRegionRootCopy.