Cubic Compass Software

- Support Wiki

Cloning Web Pages

Modified: 2009/05/15 00:36 by mleach - Categorized as: Dialogue Script
This Dialogue Script copies an entire sitemap in batch to a new position in the sitemap. Copy this script to the page above the target copy location in the sitemap.


<h1>Clone Pages</h1>
<dlog:Button id="CopyBtn" Text="Clone Home Page to Here"/> <dlog:Label ID="Output" /> 
<%
if Page.IsPostBack:
	sourceID = System.Guid("aa970ae6-ff40-41e4-93ac-fea8bd22d255")    # Change to the view ID of the source page
	Output.Text = "Starting clone..."
	sourceView = UserView(sourceID)
	sourceView.Clone(CurrentView.CatalogItemID, True)  # True means copy all sub-views. False clones a single page
	GlobalExceptionHandler.ResetAllCaches()
	Output.Text = "Clone complete"
%>


Cloned pages have a "_copy" suffix, so "home.aspx" becomes "home_copy.aspx" when cloned.

ScrewTurn Wiki version 2.0.35. Some of the icons created by FamFamFam.