Thanks. It brings me closer to what I want to achieve. My next question is where exactly in the code I should put it, so that it looks like activesocial.com website (on the side). Currently it shows on the top for me.
I went to Control Panel -> Design -> Social Templates -> New Template -> Copy existing template -> Groups -> GroupsList
In GroupsList template I added it like this
<h1>[RESX:BrowseGroups]</h1>
<b>Categories List</b>
Categories
[AS:CONTROL:CATEGORIES:1]
<div style="height:20px;">
<table cellpadding="0" cellspacing="0" border="0" style="float:right;">