mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Providing a query builder off of the IContentManager interface.
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4042269
This commit is contained in:
@@ -5,7 +5,7 @@ using Orchard.Security;
|
||||
|
||||
namespace Orchard.Blogs.Models {
|
||||
public class BlogPost : ContentPart<BlogPostRecord> {
|
||||
//public Blog Blog { get; set; }
|
||||
public Blog Blog { get; set; }
|
||||
public string Title { get { return this.As<RoutableAspect>().Title; } }
|
||||
public string Body { get { return this.As<BodyAspect>().Body; } }
|
||||
public string Slug { get { return this.As<RoutableAspect>().Slug; } }
|
||||
|
@@ -11,7 +11,7 @@ namespace Orchard.Blogs.Models {
|
||||
Filters.Add(new ActivatingFilter<RoutableAspect>("blogpost"));
|
||||
Filters.Add(new ActivatingFilter<BodyAspect>("blogpost"));
|
||||
Filters.Add(new StorageFilter<BlogPostRecord>(repository));
|
||||
//AddOnLoaded<BlogPost>((context, bp) => bp.Blog = contentManager.Get<Blog>(context.ContentItem.Id));
|
||||
AddOnLoaded<BlogPost>((context, bp) => bp.Blog = contentManager.Get<Blog>(bp.Record.Blog.Id));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user