protected override void EnsureViewData(FileEditorModel model, Framework.Persistence.Model.IO.File file)
        {
            base.EnsureViewData(model, file);

            // Setup UIElements
            model.UIElements.Add(new SeperatorUIElement());
            model.UIElements.Add(new ButtonUIElement
            {
                Alias          = "InsertField",
                Title          = "Insert an rebel page field",
                CssClass       = "insert-field-button toolbar-button",
                AdditionalData = new Dictionary <string, string>
                {
                    { "id", "submit_InsertField" },
                    { "name", "submit.InsertField" }
                }
            });
            model.UIElements.Add(new ButtonUIElement
            {
                Alias          = "InsertMacro",
                Title          = "Insert a macro",
                CssClass       = "insert-macro-button toolbar-button",
                AdditionalData = new Dictionary <string, string>
                {
                    { "id", "submit_InsertMacro" },
                    { "name", "submit.InsertMacro" }
                }
            });
        }
        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().ToRebelAlias(),
                    MacroType    = "PartialView",
                    SelectedItem = file.GetFileNameWithoutExtension()
                };

                macroEditor.PerformSave(macroModel);
            }
        }