public ActionResult Preview(PageData currentPage, OrganisationalUnitListModel organisationalUnitListModel) { var pd = (OrganisationalUnitPage)currentPage; PreviewTextLength = 200; var model = new OrganisationalUnitPageModel(pd) { Categories = CategoryHelper.GetCategoryViewModels(pd), PreviewText = GetPreviewText(pd), //ShowIntroduction = organisationalUnitListModel.ShowIntroduction, //ShowPublishDate = organisationalUnitListModel.ShowPublishDate }; return(PartialView("Preview", model)); }
private readonly Injected <IContentLoader> contentLoader; // private IContentLoader contentLoader; public override ActionResult Index(OrganisationalUnitListBlock currentBlock) { //var category = Request.RequestContext.GetCustomRouteData<Category>("category"); var organisationalUnits = FindPages(currentBlock); //, category); organisationalUnits = Sort(organisationalUnits, currentBlock.SortOrder); /* * if(currentBlock.Count > 0) * { * organisationalUnits = organisationalUnits.Take(currentBlock.Count); * } */ var model = new OrganisationalUnitListModel() // (currentBlock) { OrganisationalUnits = organisationalUnits //Heading = string.Empty //category != null ? "Category tags for post: "+category.Name : string.Empty }; return(PartialView(model)); }