1,804 articles and 14,688 comments as of Tuesday, March 8th, 2011

EndUserSharePoint has combined resources with NothingButSharePoint.com. You can now find End User (Mark Miller), Developer (Jeremy Thake) and IT Pro SharePoint (Joel Oleson) content all in one place!

This site is a historical archive and is no longer being updated. Please update your favorites, bookmarks and RSS feeds.

NothingButSharePoint.com
Thursday, January 15, 2009

How to Display SharePoint Blog Post Archives

Posts ArchiveNote from Mark Miller, Editor: This post has been updated based upon errors mentioned in the comments section. The inline table has been updated and the downloadable web part is also updated.

Most blog engines allow you to display a list of blog posts grouped by month. Unfortunately out of the box SharePoint blog sites do not give you that ability. Here is a simple solution on how to overcome that limitation.

Please note that it only works with the default SharePoint Blog site template.

Create New Columns

Create two additional columns for your Posts list:


Column

Format

Formula

Month Published

Calculated Column
(single line of text)

=TEXT(Published,"mmm yy")

Month Published OrderBy

Calculated Column
(single line of text)

=TEXT(Published,"yyyy.mm")

The first one will be used to display the month name (e.g. Nov 08), and second will be used to order the dataset. The formulas have been tested with US English regional settings; the exact formula might be different for your region. You can also adopt each formula to match the desired output, just do not change the name of the column.

Implementing the Solution

I have created a custom web part from a Data View Web part that does not deploy any custom code, it is a pure XSLT solution. Upload the web part onto the entrance page of your blog.

The final output will look like this:

Posts Archive

Conclusion

So there you go… a quick, simple solution to a common request in SharePoint: How can I create an archive for my SharePoint blog posts. What else do you have in mind?

Toni FrankolaAuthor: Toni Frankola
SharePoint Use Cases
Toni started his Web adventure in late 90’s and has been working with various web technologies ever since.

Toni is leading project engagements and managing a team of consultants specializing in Microsoft technologies. His primary focus is on Microsoft Office SharePoint and Dynamics CRM. He works at Perpetuum Mobile, a Microsoft Gold Partner from Croatia.

 

Please Join the Discussion

58 Responses to “How to Display SharePoint Blog Post Archives”
  1. baberak says:

    how I can read the post list from sub site, suppose I have parent site called Blogs center and under this sites I have 2 blogs site, I want 2 add 2 arvhive sweb part to be on the blogs center home page and read from the posts in the blogs subistes

  2. Murali says:

    Please Replay anybody for my issue still am not able to resolve this issue.

    below code is working when i enable the alert statement(i.e if i remove alert stmt it showing default site template under that tab.

    function setCustom()
    {

    var element = document.getElementById(”ctl00_PlaceHolderMain_InputFormTemplatePickerControl_ctl00_ctl00_LbWebTemplate”);
    var tempname= document.getElementById(”ctl00_PlaceHolderMain_TemplateName”).value;
    var tabs=tempname.split(’;')
    var tabslcid=”1033&”;
    var getTemplates=tabslcid.concat(tabs[1]);
    GetWebTemplates(getTemplates,tabs[0]);
    var options = element.options;
    var test = “false”;
    var count=0;
    //alert(tabs[0]);
    for (var i = 0; i < options.length; i++)
    {
    if (options[i].value == tabs[0])
    {
    options[i].selected = true;
    return;
    }

    }
    }
    setTimeout("setCustom();", 200);

    above code is working when i enable the alert statement(i.e if i remove alert stmt it showing default site template under that tab.

    so how to do that. if you have any solution send me.

    Thanks in Advaced

  3. Can you tell me what I would have to do in order to modify this webpart for use with a customized announcement list? We have had to deploy an email to list scenario for a client who wanted to use the blog template. Unfortunately the solution needs to include the ability to attach files and blogs simply will not handle that. So now, I am trying to create some of the archive functionality that is lost when going to a list from a blog.

Trackbacks

Check out what others are saying about this post...



Notify me of comments to this article:


Speak and you will be heard.

We check comments hourly.
If you want a pic to show with your comment, go get a gravatar!