CS2 Blogging at the root

本文详细介绍了如何在CS2Blogging中进行根目录配置,包括修改communityServer.config文件中的defaultApplicationKey属性,更新SiteUrls.config中的路径转换,以及调整location标签以保持安装的通用性。

[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)

AlphaWu.CoM

<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

转载于:https://www.cnblogs.com/AlphaWu/archive/2006/11/23/570202.html

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值