Single Blog Only - Community Server 2.1

written by Rick Reszler on Thursday, February 08 2007

If you are running Community Server 2.1 and would like to have a single blog as the home page then this post is for you.

All you need to do this is Ken Robertson's great Qgyen.ExtendedUrlMapping v2.1.60714 CS Module and a some tweaking to the SiteUrls.config and the CommunityServer.config to make it happen.

The section in green below is taken directly from the readme.txt that is included with Ken's mod. 

Follow these instructions to setup the modules:

1. Place the Qgyen.ExtendedUrlMappings.dll file in the 'bin' directory of the site.

2. Open the communityserver.config and replace the entry in the <providers> section for
   SiteUrlsData with the following.  Additionally, add the provider for UrlReWriteProvider
   directly below it.

   <add
       name = "SiteUrlsDataProvider"
       type = "Qgyen.ExtendedUrlMapping.SiteUrlsData, Qgyen.ExtendedUrlMapping"
       path = "SiteUrls.config"
   />

   <add
       name = "UrlReWriteProvider"
       type = "Qgyen.ExtendedUrlMapping.UrlReWriter, Qgyen.ExtendedUrlMapping"
   />

3. Open the SiteUrls.config file and a <extendedMappings> section after the <SiteUrls> line.
   You will want the beginning of the file to look like this:

   <?xml version="1.0" encoding="utf-8" ?>
   <SiteUrls>

   <extendedMappings>
       <add path="/photos" newPath="/photos/photos" />
       <add path="/" newPath="/blogs/sample_weblog" />
   </extendedMappings>

   <locations>

This is where it can get a little confusing so I am going to use my Reszler.Org site as an example.

In step 3. above I have created a blog on my site called rick so the default or stock url for the blog is http://www.reszler.org/blogs/rick so the new path field below would be "/blogs/rick" which you can see is being mapped to the root by the "/"

  <extendedMappings>
       <add path="/" newPath="/blogs/rick" />
   </extendedMappings>

Then in the SiteUrls.config file in the navigation section I have commented out the blogs link by surrounding the line with <!-- --> and what this does is removes the Blogs link from the navigation bar and since we are mapping the blog to the root it becomes the new home page.

<link name="home" resourceUrl="home" resourceName="home" roles="Everyone" />
    <!--<link name="home" resourceUrl="webloghome" resourceName="weblogs" roles="Everyone" applicationType = "Weblog" />-->
    <link name="forums" resourceUrl="forumshome" resourceName="forums" roles="Everyone" applicationType = "Forum" />

This last step is only if you want the Home link and not the Blogs link since it's a single blog only site it make sense but if you want the Home link to say Blog instead then all you have to do last is open up the Languages\en-US\Resources.xml file and in the main navigation section change >Home< to >Blog<

<!-- Main Navigation -->
<resource name="home">Home</resource>

Similar Posts

  1. Multiple Blogs at the Root
  2. Community Server 2.1, Service Pack 2 Released
  3. Adding Front Page News to CS 2.1

Comments

Comments are closed

Options:

Size

Colors