Mar 26, 2011 at 7:32 PM
Edited Mar 26, 2011 at 7:37 PM
This is a conceptual question (I really think there should be a seperate topic just for conceptual).
I kind of think there are too many topics ... it's really hard to track new posts, especially when a lot of things get posted in multiple topics :)
Anyway, you're pretty much spot on about content. The default Orchard installation (or the Recipe in 1.1) creates some content types for you (Page and List obviously; but there are other ones hidden away such as User). You are free to customise these content
types in any way you want. What makes a Page actually page-like are the Routable and Body parts.
Blogs and Blog Posts are also just content types. A module can define its own content types and compose them out of any available parts. There are two special parts that the Blog module comes with: BlogPart and BlogPostPart.
The reason you can't create your own Blog content type from scratch is simply because the BlogPart and BlogPostPart aren't available in the list of attachable parts. That's normally done in Migrations.cs where you have a command like this:
typeof(BlogPostPart).Name, cfg => cfg.Attachable());
However because the blog module is lacking those lines, you can't "roll your own". But you can still customise Blog and BlogPost in the Content Types section of the Dashboard, you'll just notice you can't remove the Blog or Blog Post parts.
Why do Pages show in the New menu and get listed in Content Items, whereas Blogs don't? I think it has to do with this from Migrations.cs in Orchard.Pages module:
I think it's the .Creatable() command (and nothing else) that differentiates it from blogs and blog posts.
I'm not sure of all the reasons for doing it this way. In part I think it's because the Blog module comes with its own admin UI and it'd be redundant to have two ways of managing stuff. Also the Content Items screen would quickly get out of control if 10s
or 100s of blog posts were there mixed in with all your other content. But I can't see any real reason to prevent custom types of blog and blog post from being created. Maybe you could experiment with making those parts attachable and see what happens? ...Not
on a production site of course, in case things blow up :)
Hope that helps explain!