Exemplo n.º 1
0
        private String bindData(IBlock sectionBlock, ContentSection articleSection)
        {
            IPageSection   section    = BinderUtils.GetPageSectionAdmin(articleSection, ctx, "AdminSectionShow");
            ControllerBase controller = section as ControllerBase;

            bindSettingLink(sectionBlock, section.GetSettingLink(articleSection.Id));
            section.AdminSectionShow(articleSection.Id);
            return(controller.utils.getActionResult());
        }
Exemplo n.º 2
0
        private String getData(ContentSection articleSection)
        {
            IPageSection   section           = BinderUtils.GetPageSection(articleSection, ctx);
            ControllerBase sectionController = section as ControllerBase;

            section.SectionShow(articleSection.Id);
            String actionContent = sectionController.utils.getActionResult();

            return(actionContent);
        }
 private static string SectionContent(IHtmlHelper html, ISitePage sitepage, IPageSection model)
 {
     using (StringWriter result = new StringWriter())
     {
         foreach (var item in model.Items)
         {
             item.Page = sitepage;
             html.Partial(item.Template, item).WriteTo(result, HtmlEncoder.Default);
         }
         return result.ToString();
     }
 }
Exemplo n.º 4
0
        public ActionResult PageSection()
        {
            // Get datasource model data from glass mapper
            IPageSection datasourceItem = _glassMapperService.GetDataSourceItem <IPageSection>();

            if (datasourceItem != null)
            {
                _logger.DebugInfo($"Added a Page Section to page with following data source: {datasourceItem.FullPath}");
                return(PartialView("~/Views/Feature/GeneralContent/PageSection.cshtml", datasourceItem));
            }

            return(PartialView("~/Views/Common/NoDataSourceItem.cshtml"));
        }
Exemplo n.º 5
0
 int CompareSections(IPageSection a, IPageSection b)
 {
     return a.Bounds.Top.CompareTo(b.Bounds.Top);
 }