CS2 Blogging at the root
[From:CS2 Blogging at the root][name:CS2 Blogging at the root][tags:CommunityServer]
Scott Watermaysk has spent a considerable ammount of time making sure CS 2 would have an out of the box solution for those of us that run a small or single site with it... To that end, lots of small changes have been made to our siteURLS.config file and some critical configuration properties have been added... Additionaly we went all the way as to allow you to specify a URL re-writer provider on a per "location" basis... so if you dont like how re-writing works in a particualr CS app, or want to do something custom, you can still use the framework...
But to the point... in CS2B2 the documentation is missing for blogging at the root... but here is all you need to do...
In the communityServer.config... you need to set the "defaultApplicationKey" property for blogs to be that of your single blog...
<Weblog |
defaultTheme = "default" enableSkinCache = "true" enableThemes = "true" |
aggregatePostSize = "250" createDirectories = "true" enableCommentRedirects = "true" |
servicePostCountLimit = "25" aggregatePostCount = "25" individualPostCount = "15" |
defaultApplicationKey="DanB"> |
Replace "DanB" to Your Blog ApplicationKey
This will allow CS to use that applicaiton key if none is provided on the querystring (or in the path)
Next, we can remove the application key from the CS paths, by editing the "##blogdirectory##" transformer in the SiteUrls.config.... just set it to an empty string, and your applicaiton key, will now be coming from the default.. (Note the XML attributes / tags mentioned here are case senative)
<add key = "##blogdirectory##" value = "" /> |
Finally, if you are like me; I run my blog at the root of the cs site... (not in the /blogs/ folder) but I like to keep my install as generic as possible, which means all the files are still in the /blogs folder... to do this, you need to update the "location" tag for blogs... We support this through use of a "physicalPath" attribute.
<location name="weblogs" path="/" physicalPath="/blogs/" type="CommunityServer.Blogs.Components.SingleBlogLocation, CommunityServer.Blogs"/> |
This should get you all set up... the following should also work for galleries...
Dan