Category Archives: 2942

Configurable sidebar (News section) in Community Server

Customising your blog when you don’t host it yourself can be pain. 

Heaps of blogs out there are on Community Server. blogs.msdn.com is one of the more prominent ones. msmvps.com is too. Having previously been on blogspot.com, where you can control almost every aspect of your template, I’ve found the transition to Community Server a little painful at times.

There are a bunch of skins I can choose from, and that’s great, but if I want to change the information that appears down the side, I need to put it into the News section. But then it looks like it’s News, when really it’s not.

So I’ve made a few workarounds.

For starters, I’ve added some custom CSS to the spot where I choose a skin. In particular, I’ve told the newsTitle style to be hidden. “display:none;” is the code you want, like this:

.newsTitle
{
    display:none;
}
 

Now because I still want my stuff to display in sections, I’ve done some more tweaking. Within the News section, I’ve defined my own. So I have things like this in there:

<div class=”sideNavItems”><h3>Can’t find something?</h3>Try checking my old blog…<br /><a href=’http://robfarley.blogspot.com’>http://robfarley.blogspot.com</a></div>

The ‘sideNavItems’ bit puts the box around it (or whatever your skin wants it to do), and the ‘h3’ makes the header the same style as the other sections. This makes it look like it’s a proper Community Server section, but it’s not. It’s just my own content. So now I can have my own lists, and exercise as much control over them as I like.

Customising the wHooiz Friendz list

If you look at Nick’s blog, you’ll see that he has a lot more wHooiz Friendz than me. That’s probably because he’s a lot more popular than I am. But also, I filter my list to show only a few. If you refresh the page, you’ll see more.

You’ll also notice that he has a big blue and white title at the top, which currently says “Friendz recently here” (but is subject to change – this comes from the wHooiz script that produces the list). But I don’t have that on mine. I have the standard Community Server sidebar heading, but that’s it. And here’s how I did that… Really simple – I looked at the HTML that’s shown, to see that that title bit has an id of whooiz_tr1, and then altered my CSS slightly, adding #whooiz_tr1 { display:none; } to it.

I guess I could’ve just changed its style to be just like one of my normal sidebar headers, but I actually figured that it would be easier to scrap it completely, and have my own header there. 🙂