The day after releasing a new version of Sueetie is always a nutty time. We find out what I screwed up (missing image file, debug="true" in the web.config--that sort of thing), but also what are the points of interest in the new release.
One of the points of interest in v2.0 is multiple blog support. Multiple blog support was actually part of the v1.3 release, but it's still a great v2.0 feature. Unlimited BlogEngine.NET blogs? Who doesn't want that!
As multiple blog deployments become more prevalent in Sueetie Communities it's clear we probably want to automate the process a bit, but for Sueetie Version 2.0 there are a few steps to perform.
In response to today’s conversation about creating new blogs I was inspired to create a new "How-To" area in the Sueetie Wiki, with How To Create a Blog as the first Sueetie How-To Guide. That document is below.
Not a One-Click Process, But Not Hard
Creating a new blog in Sueetie is not a one-click process, not in the current Version 2.0 release anyway. Multiple blogs are FULLY SUPPORTED, but are not a common community feature in most Sueetie installations. Perhaps that will change, in which case you'll see that the process will be more automated. For the time being, here is a visual walk-through of the process of adding a new blog to your Sueetie Community.
We're going to add a travel blog to our Sueetie site. We add the travel blog as a new application in Sueetie Administration...
Where we see it's now a bona fide Sueetie with a "Blog" application type and "travel" application key.
Now we're going to go to the Blog Administration page to provide a blog description and any Role assignments. This step is optional.
Onto the Application!
You might think that we're pretty much done now. "Where's my blog????" More to do. Sorry. BlogEngine.NET doesn't support multi-blogs in a single instance, at least not yet. The Sueetie framework supports unlimited BlogEngine.NET blogs, but we still need to create the physical application.
We start by making a copy of the /blog folder, which is our BlogEngine.NET instance.
...and rename it "travel." (Remember, the blog folder name needs to match the application key for full integration with Sueetie.)
The blog we copied probably had some posts in it. Those are in /blog/app_data/posts. We'll want to clean out that directory. (Another option would be to use the /blog folder from the Gummy Bear Web Package, in which case we wouldn't need to clean out anything.)
We need to go into IIS now and convert our /travel blog folder to an IIS Application.
Now we can go to our Sueetie aggregated blog page at http://oursite/blogs and see it's empty. That's because there are no posts yet created.
We go to our new blog at http://oursite/travel and see it's an empty duplicate of our site blog.
At this point if we're using Atomo we can add our travel blog website project to our Atomo Solution. You don't need Atomo to have multiple blogs. It makes editing them easier as we're going to do now in changing the sidebar content.
For completeness sake, we'll edit the sidebar content in /travel/themes/lollipop/site.master
Adding a blog administrator
Sueetie Version 2.0 was not designed to provided an automated setup experience as we discussed, and it was certainly not designed to automate assigning administrators to multiple blogs. To be honest, until I wrote this How-To, I hadn't given the assignment of administrators to multiple blogs a second thought. Sueetie DOES support automated assignment of blog administrator to the site's primary blog, and we're going to use that process to assign give a user blog administrator rights to our travel blog.
Please note, the BlogAdministrator Role is designed to be administrator of ALL blogs. If you have multiple bloggers and need to segregate administration of individual blogs, then the best approach would probably be creating Blog Editor roles for each blog. If you know BlogEngine.NET then it's very easy to do, but it's not a built-in function of Sueetie in Version 2.0.
So to give a user Blog Administrator permissions to create posts on our new Travel Blog we start in Sueetie Administration and add our new user "Rockman" to the BlogAdministrator Role.
Rockman logs in, goes to the travel blog at http://oursite.com/travel and Sueetie gives him the green light for creating blog posts and managing the travel blog.
Creating the BlogEngine.NET User Profile
Blog authors need a profile XML data file in /THEBLOG/app_data/profiles/USERNAME.xml. As you can see, our Sueetie Blog Administrator Assignment function above created that Profile data file for Rockman. The problem, since Sueetie Blog Administration was designed for a single blog, that's where it put Rockman's profile, in the site blog and not in our Travel Blog. (In a Sueetie v2.x release we will most likely extend Sueetie Blog Administration functions to accommodate multiple blogs, particularly if a lot of Sueetie sites are sporting multiple blogs.)
So we're going to relocate the rockman.XML from /blog to our /travel/app_data/profiles folder.
As you can see when we return to our Sueetie Aggregate Blogs Page at http://oursite.com/blogs we see our first travel post (along with a blog post for completeness.)
And besides our Aggregate Blogs Page being happily populated, all travel blog content and activity is now fully integrated into the Sueetie Framework where it appears in site-wide features like the Site Activity Log.