protected override void OnAfterCreate(Framework.Persistence.Model.IO.File file) { if(Request.Form.ContainsKey("createMacro")) { var macroEditor = new MacroEditorController(BackOfficeRequestContext) { ControllerContext = this.ControllerContext }; var macroModel = new MacroEditorModel { Name = file.GetFileNameWithoutExtension(), Alias = file.GetFileNameWithoutExtension().ToUmbracoAlias(), MacroType = "PartialView", SelectedItem = file.GetFileNameWithoutExtension() }; macroEditor.PerformSave(macroModel); } }
protected override void OnAfterCreate(Framework.Persistence.Model.IO.File file) { if (Request.Form.ContainsKey("createMacro")) { var macroEditor = new MacroEditorController(BackOfficeRequestContext) { ControllerContext = this.ControllerContext }; var macroModel = new MacroEditorModel { Name = file.GetFileNameWithoutExtension(), Alias = file.GetFileNameWithoutExtension().ToUmbracoAlias(), MacroType = "PartialView", SelectedItem = file.GetFileNameWithoutExtension() }; macroEditor.PerformSave(macroModel); } }