ISiteCopyRegionRootPage Method |
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
IEnumerable<ILingualPageMap> CopyRegionRootPage( IPage page, IPage parent, EnumCopyActions placing, ILocale targetLocale )
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.