static string GetCategories(ICollection<Category> categories)
{
if (categories == null || categories.Count == 0)
return string.Empty;
var html = categories.Aggregate("", (current, cat) => current + string.Format("<a href='#' onclick=\"ChangePostFilter('Category','{0}','{1}')\">{1}</a>, ", cat.Id, cat.Title));
return html.Trim().Substring(0, html.Trim().Length - 1);
}