Dave Burke : Freelance .NET Web Developer specializing in Online Communities

My CS2007 .configs for DBVT.COM

Configuring Community Server to support single blogs or different configurations than the out-of-the-box config has never been real easy.  But then again, Community Server's underlying UrlRewriting architecture is one of the features that makes it such a powerful platform.  I mean, when you buy a GMC Yukon XL Denali you expect to put high-octane gas in it, after all.

I'm seeing a few configuration questions on the CS2007 Beta Forum and know this is going to come up again, especially since the _Override.config files have been introduced, so I thought I'd quickly walk through my DBVT site configuration in CS2007.  No, DBVT.COM is still CS 2.1.  You know me, I never go production until RTM, but this is how my development DBVTCS2007 site is configured and is working perfectly.

First, a quick DBVT site configuration rundown.  First, I want my home page!   I preserve the CS default home page (not an aggregate blog list) and put my blog at \blog.  I have 3 other blogs at DBVT:  Running, CS Bits, and a mirrored blog I designed for all of my non-CS blog posts I call my Everyday blog.  They reside at \running, \csbits and \everyday respectively.  I also have a single photo gallery, and I want my site configured so that I am taken directly to my photo gallery, not the All Galleries page. 

First I create the links in the SiteUrls.config as normal.  I hardcode the navigateUrl and text for no particular reason. 

 

Below is a look at the SiteUrls_Override.config file.  Two items to point out here.  1) Changing the webloghome location preserves the CS Home Page.  If this isn't done the site home page will be the blogs aggregate page.  Then 2) to support my single Photo Gallery, I add a type value to the Galleries location.  This displays my single photo gallery page when clicking on the Photos tab.


 

 

This is an excerpt from my CommunityServer_Override.config file to set the default Application Key for the single photo configuration.


 

An important tip here with CS2007.  Give your blogs the ApplicationKey of your directories and add a blank default.aspx in the directories to answer to IIS before the requests are handed off to the CSRewriting module.

 

 

That should do it to support a single or multiple blog configuration while preserving the home page, plus a single photo gallery.  We're still in beta and my _override.configs are not locked-in and probably contain unnecessary noise, but hopefully this approach will help you get that Yukon out of the garage and on the highway.

My CommunityServer_Override.config, SiteUrls.config and SiteUrls_Override.config files are located in this zip file.

[UPDATE: A big thanks to Jayson Knight and Keyvan Nayyeri who pointed out the CS2007 RTM release requires additions to the siteurls_override.config to handle a 404 on the RSS feeds. That is below.  Thanks Jayson and Keyvan!]

 

<Override xpath = "/SiteUrls/locations/location[@name='weblogs']" mode = "change" name = "path" value = "/" />
<Override xpath = "/SiteUrls/locations/location[@name='weblogs']" mode = "new" name = "physicalPath" value = "/blogs/" />
 
 
<Override xpath = "/SiteUrls/locations/location[@name='weblogs']/url[@name='webloghome']" mode = "update">
<url name = "webloghome"  path="blog" pattern="default.aspx" physicalPath="/themes/default/common/"  vanity="{2}" page="home.aspx" />
      <url name = "feedshome"  path="feeds" pattern="default.aspx" physicalPath="/themes/default/common/"  vanity="{2}" page="home.aspx" />
</Override>

 

 

Comments (0) | Post RSS RSS comment feed

Posted on 3/22/2007 2:09:00 PM by Dave Burke
Categories: Community Server
Tags:

Related posts


Powered by BlogEngine.NET 2.0.0.36
Theme by Dave Burke