コード例 #1
0
    public override void Insert()
    {
      SiteContext siteContext = Context.Site;

      if (((siteContext != null) && (siteContext.EnableWebEdit && (siteContext.DisplayMode == DisplayMode.Edit))) && (WebUtil.GetQueryString("sc_webedit") != "0"))
      {
        UserControlRenderer editControl = new UserControlRenderer { Src = "/sitecore/shell/Applications/Taxonomy/Controls/PageEditor/TaxomomiesRendering.ascx" };

        RenderingReference menuRenderingReference = new RenderingReference(editControl) { Placeholder = "webedit", AddToFormIfUnused = true };
        Context.Page.AddRendering(menuRenderingReference);
      }
    }
コード例 #2
0
        public override void Insert()
        {
            SiteContext siteContext = Context.Site;

            if (((siteContext != null) && (siteContext.EnableWebEdit && (siteContext.DisplayMode == DisplayMode.Edit))) && (WebUtil.GetQueryString("sc_webedit") != "0"))
            {
                UserControlRenderer editControl = new UserControlRenderer {
                    Src = "/sitecore/shell/Applications/Taxonomy/Controls/PageEditor/TaxomomiesRendering.ascx"
                };

                RenderingReference menuRenderingReference = new RenderingReference(editControl)
                {
                    Placeholder = "webedit", AddToFormIfUnused = true
                };
                Context.Page.AddRendering(menuRenderingReference);
            }
        }
コード例 #3
0
        public void SaveAll(List <Event> events)
        {
            var uc = ((EventsViewer)UserControlRenderer.LoadControl("/Examples/Calendar/Overview/Shared/Common/EventsViewer.ascx"));

            uc.Render(events);
        }
コード例 #4
0
        public string SaveAll(List <EventModel> events)
        {
            EventsViewer uc = ((EventsViewer)UserControlRenderer.LoadControl("/Examples/Calendar/Overview/Shared/Common/EventsViewer.ascx"));

            return(uc.ToScript(events));
        }