public ActionResult Insert(InsertModel im) { EditModel pm = null; if (im.OriginalId != Guid.Empty) { pm = EditModel.CreateByOriginalAndPosition(im.OriginalId, im.ParentId, im.Seqno, im.SiteTreeId, im.SiteTree); } else { pm = EditModel.CreateByTemplateAndPosition(im.TemplateId, im.ParentId, im.Seqno, im.SiteTreeId, im.SiteTree); } ViewBag.Title = Piranha.Resources.Page.EditTitleNew + pm.Template.Name.ToLower(); // Executes the page list loaded hook, if registered if (Hooks.Manager.Page.Model.OnLoad != null) { Hooks.Manager.Page.Model.OnLoad(this, WebPages.Manager.GetActiveMenuItem(), pm); } if (im.OriginalId != Guid.Empty) { return(View(@"~/Areas/Manager/Views/Page/EditCopy.cshtml", pm)); } return(View(@"~/Areas/Manager/Views/Page/Edit.cshtml", pm)); }