J-O Eriksson

Community Server on my mind

News

Subscribe via FeedBurner

Subscribe via email

<script type="text/javascript"><!-- google_ad_client = "pub-6305396639794057"; google_ad_width = 120; google_ad_height = 240; google_ad_format = "120x240_as"; google_ad_type = "text_image"; google_ad_channel ="5472463295"; google_color_border = "FFFFFF"; google_color_link = "0000FF"; google_color_bg = "FFFFFF"; google_color_text = "000000"; google_color_url = "008000"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>

Subscribe in NewsGator Online

Subscribe in Bloglines

Add to Google

<script type="text/javascript" src="http://embed.technorati.com/embed/tb2ijzxn26.js"></script>

Blogs I read

Links

CS2: Show only posts from a specific blog on the Home Page

Since I run a couple of Community Server sites myself, and also have followed the progress of this application since the end of 2003 (for example I coordinated the translation work for the first versions, and I was honored with a CS MVP title a while ago), I am going to also write some posts about CS in this blog.

I also write about CS in my blog at http://communityserver.se but it’s all in Swedish there, so you might not understand much.

So in this first post, I’d like to show you a little trick I contributed to the CS Forums a while back.

If you are familiar with CS you know that it has a list on the home page, which shows the latest posts from the blogs. But there might be situations when you don’t want everyone’s blog posts to show up there. Instead you might want to use that list for announcements and similar, which you have control over yourself. CS is built on a lot of ASP .NET server controls, and fortunately the list I am talking about is also a server control. Open the default.aspx from the root directory of your CS web in i.e. notepad and have a look. You should be able to find a tag like this:

<Blog:AggregatePostList runat="Server" PageSize=5 id="AggregateBlogPosts" EnablePaging="false" EnableTitle="false">

What you don’t see there is that there are more parameters available to this control. One of them, which we are going to use here is the “ApplicationKey” parameter. With it you can determine which blogs latest posts that should be shown. So If the blog I want to show has the ApplicationKey MyBlog, I should edit the tag to look like this:

<Blog:AggregatePostList runat="Server" PageSize=5 id="AggregateBlogPosts" EnablePaging="false" EnableTitle="false" ApplicationKey=”MyBlog”>

But how do I know the ApplicationKey you might wonder? One way to find out is to go to your blog in a browser. If the link is for example: http://mydomainname.com/blogs/MyBlog. The ApplicationKey is the word after blogs in the path. You can also find the ApplicationKey for a blog in CS’s ControlPanel, although it might be hard to find.

Comments

No Comments