public BlogPostPart Get(BlogPart blogPart, string slug, VersionOptions versionOptions) { var postPath = blogPart.As<IRoutableAspect>().GetChildPath(slug); return _contentManager.Query(versionOptions, "BlogPost").Join<RoutePartRecord>().Where(rr => rr.Path == postPath). Join<CommonPartRecord>().Where(cr => cr.Container == blogPart.Record.ContentItemRecord).List(). SingleOrDefault().As<BlogPostPart>(); }
public static string BlogArchiveDay(this UrlHelper urlHelper, BlogPart blogPart, int year, int month, int day) { return urlHelper.Action("ListByArchive", "BlogPost", new { blogPath = blogPart.As<IRoutableAspect>().Path, archiveData = string.Format("{0}/{1}/{2}", year, month, day), area = "Orchard.Blogs" }); }
public static string BlogArchiveYear(this UrlHelper urlHelper, BlogPart blogPart, int year) { return urlHelper.Action("ListByArchive", "BlogPost", new { blogPath = blogPart.As<IRoutableAspect>().Path, archiveData = year.ToString(), area = "Orchard.Blogs" }); }
public static string BlogRsd(this UrlHelper urlHelper, BlogPart blogPart) { return urlHelper.AbsoluteAction(() => urlHelper.Action("Rsd", "RemoteBlogPublishing", new { blogPath = blogPart.As<IRoutableAspect>().Path, area = "Orchard.Blogs" })); }
public static string Blog(this UrlHelper urlHelper, BlogPart blogPart) { return urlHelper.Action("Item", "Blog", new { blogPath = blogPart.As<IRoutableAspect>().Path, area = "Orchard.Blogs" }); }
public static string BlogArchiveDay(this UrlHelper urlHelper, BlogPart blogPart, int year, int month, int day) { var blogPath = blogPart.As<IAliasAspect>().Path; return urlHelper.Action("ListByArchive", "BlogPost", new { path = (string.IsNullOrWhiteSpace(blogPath) ? "archive/" : blogPath + "/archive/") + string.Format("{0}/{1}/{2}", year, month, day), area = "Orchard.Blogs" }); }
public static string BlogArchiveYear(this UrlHelper urlHelper, BlogPart blogPart, int year) { var blogPath = blogPart.As<IAliasAspect>().Path; return urlHelper.Action("ListByArchive", "BlogPost", new { path = (string.IsNullOrWhiteSpace(blogPath) ? "archive/" : blogPath + "/archive/") + year.ToString(), area = "Orchard.Blogs" }); }