コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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);
            }
        }