public ActionResult Preview(PageData currentPage, BlogListModel blogModel) { var pd = (BlogItemPage)currentPage; PreviewTextLength = 200; var model = new BlogItemPageModel(pd) { Tags = GetTags(pd), PreviewText = GetPreviewText(pd), ShowIntroduction = blogModel.ShowIntroduction, ShowPublishDate = blogModel.ShowPublishDate }; return PartialView("Preview", model); }
public ActionResult Preview(PageData currentPage, BlogListModel blogModel) { var pd = (BlogItemPage)currentPage; PreviewTextLength = 200; var model = new BlogItemPageModel(pd) { Tags = GetTags(pd), PreviewText = GetPreviewText(pd), ShowIntroduction = blogModel.ShowIntroduction, ShowPublishDate = blogModel.ShowPublishDate }; return(PartialView("Preview", model)); }
private BlogItemPageModel GetBlogItemPageModel(PageData currentPage, BlogListPageViewModel blogModel) { var pd = (BlogItemPage)currentPage; PreviewTextLength = 200; var model = new BlogItemPageModel(pd) { Tags = GetTags(pd), PreviewText = GetPreviewText(pd), ShowIntroduction = blogModel.ShowIntroduction, ShowPublishDate = blogModel.ShowPublishDate, Template = blogModel.CurrentContent.Template, PreviewOption = blogModel.CurrentContent.PreviewOption, StartPublish = currentPage.StartPublish ?? DateTime.UtcNow }; return(model); }
public ActionResult Preview(PageData currentPage, BlogListPageViewModel blogModel, bool?flip) { var pd = (BlogItemPage)currentPage; PreviewTextLength = 200; var model = new BlogItemPageModel(pd) { Tags = GetTags(pd), PreviewText = GetPreviewText(pd), ShowIntroduction = blogModel.ShowIntroduction, ShowPublishDate = blogModel.ShowPublishDate, Template = blogModel.CurrentContent.Template, PreviewOption = blogModel.CurrentContent.PreviewOption, StartPublish = currentPage.StartPublish ?? DateTime.UtcNow, Flip = flip ?? false }; return(PartialView("Preview", model)); }
public ActionResult Full(BlogItemPage currentPage) { PreviewTextLength = 200; var model = new BlogItemPageModel(currentPage) { Category = currentPage.Category, Tags = GetTags(currentPage), PreviewText = GetPreviewText(currentPage), MainBody = currentPage.MainBody, StartPublish = currentPage.StartPublish }; var editHints = ViewData.GetEditHints<BlogItemPageModel, BlogItemPage>(); editHints.AddConnection(m => m.Category, p => p.Category); editHints.AddFullRefreshFor(p => p.Category); editHints.AddFullRefreshFor(p => p.StartPublish); return PartialView("Full", model); }
public ActionResult Index(BlogItemPage currentPage) { PreviewTextLength = 200; var model = new BlogItemPageModel(currentPage) { Category = currentPage.Category, Tags = GetTags(currentPage), PreviewText = GetPreviewText(currentPage), MainBody = currentPage.MainBody, StartPublish = currentPage.StartPublish ?? DateTime.UtcNow, BreadCrumbs = GetBreadCrumb(currentPage) }; var editHints = ViewData.GetEditHints <ContentViewModel <BlogItemPage>, BlogItemPage>(); editHints.AddConnection(m => m.CurrentContent.Category, p => p.Category); editHints.AddConnection(m => m.CurrentContent.StartPublish, p => p.StartPublish); return(View(model)); }
public ActionResult Full(BlogItemPage currentPage) { PreviewTextLength = 200; var model = new BlogItemPageModel(currentPage) { Category = currentPage.Category, Tags = GetTags(currentPage), PreviewText = GetPreviewText(currentPage), MainBody = currentPage.MainBody, StartPublish = currentPage.StartPublish.Value }; var editHints = ViewData.GetEditHints <BlogItemPageModel, BlogItemPage>(); editHints.AddConnection(m => m.Category, p => p.Category); editHints.AddFullRefreshFor(p => p.Category); editHints.AddFullRefreshFor(p => p.StartPublish); return(PartialView("Full", model)); }