/// <summary>
        /// Begins the edit frame.
        /// </summary>
        /// <param name="htmlHelper">The HTML helper.</param>
        /// <param name="editFrame">The edit frame.</param>
        /// <returns></returns>
        public static GlassEditFrame BeginEditFrame(this HtmlHelper htmlHelper, EditFrame editFrame)
        {
            var writter = new HtmlTextWriter(htmlHelper.ViewContext.Writer);

            editFrame.RenderFirstPart(writter);
            return(new GlassEditFrame(editFrame));
        }
        public static MvcEditFrame BeginEditFrame(this HtmlHelper htmlHelper, EditFrame editFrame)
        {
            var output = new HtmlTextWriter(htmlHelper.ViewContext.Writer);

            editFrame.RenderFirstPart(output);
            return(new MvcEditFrame(editFrame));
        }
Exemplo n.º 3
0
 public MvcEditFrame(TextWriter writer, string dataSource, string buttons)
 {
     htmlWriter = new HtmlTextWriter(writer);
     editFrame  = new EditFrame {
         DataSource = dataSource, Buttons = buttons
     };
     editFrame.RenderFirstPart(htmlWriter);
 }
Exemplo n.º 4
0
 public FrameEditor(HtmlHelper html, string dataSource = null, string buttons = null)
 {
     this._html = html;
     EditFrameControl = new EditFrame
     {
         DataSource = dataSource ?? "/sitecore/content/home",
         Buttons = buttons ?? "/sitecore/content/Applications/WebEdit/Edit Frame Buttons/Default"
     };
     var output = new HtmlTextWriter(html.ViewContext.Writer);
     EditFrameControl.RenderFirstPart(output);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Renders the first part.
 /// </summary>
 public void RenderFirstPart()
 {
     _frame.RenderFirstPart(_writer);
 }
Exemplo n.º 6
0
 public static GlassEditFrame BeginEditFrame(this HtmlHelper htmlHelper, EditFrame editFrame)
 {
     var writter = new HtmlTextWriter(htmlHelper.ViewContext.Writer);
     editFrame.RenderFirstPart(writter);
     return new GlassEditFrame(editFrame);
 }