Hello all,

I am looking for a Blogspot-like blog archive block for a new blog I am developing. I am aware of the archive view included with Views2, but that only gets me halfway there. Below is basically what I'm looking for:

  • > 2010 (10) [clicking on the arrow collapses/expands, clicking on 2010 takes you to blog/2010 archive page, parens are # of posts in 2010]
    • > March (5) [clicking on arrow collapses/expands, clicking on March takes you to blog/2010/03 archive page, parens are # of posts in 3/2010]
      • Blog post A [clicking on link takes you to post]
      • Blog post B
      • Blog post C
    • > February (3)
    • > January (2)
  • > 2009 (15)
    • > December (9)
    • > November (6)

Hopefully you get the idea. The archive view creates the archive links, but it does not create a collapsible hierarchy, nor put the posts in there. My personal blog (which is sorely outdated!) on Blogspot is here: http://crossward.blogspot.com and I am basically trying to mimic the functionality of the Blog Archive "block" on the right side.

Any idears?

Thanks!
Tom

Comments

atomiclint’s picture

I've been searching for this for weeks after migrating from Blogger to Drupal. I find it hard to believe that no one has done this yet considering the limitations of the core archive block.

tmdrupal’s picture

Yea, very surprising. I was really hoping I wasn't going to have to write my own!

Anybody know of anything already out there?

Tom

dimitriz1’s picture

With all the work that has been put into drupal you would expect that by now someone would have implemented a proper blog archive. Something that is an extremely BASIC feature that has been used on all blogging site for the last 5 years. It really lets down the blogging side of drupal that this isn't available, I mean why would you pick drupal for site that lets users post blogs when you can't even provide them with a basic blog archive block.

Can someone with some good drupal knowledge PLEASE finally put this much needed module together, I imagine it could probably be done in a day. I'm not even talking about collapsible months like the OP describes, Im talking about the simple blog archive that I see on every blog site I look at, something like this -

March 2010 (4)
February 2010 (3)
Januray 2010 (6)
December 2009 (2)

atomiclint’s picture

You must enable the Archive view, then a block will appear in the list. Right now there's a defaults inconsistency in the block display you'll want to remedy.

I believe the default behavior for the archive block should be to display the months in descending order, so the newest month first. This is done by updating the "Node: Created year + month" argument for the Block display to "Summary, sorted descending".

http://drupal.org/node/317395

dimitriz1’s picture

That block is not on a per user basis. If I go to user John's blog page and see an archive block that looks like

March(6)
February(11)
January(3)

I want those links to point all John's blog posts for March, February, etc...

greg.harvey’s picture

Learn more about views - all you need is a user argument.

bentonboomslang’s picture

There is a simple(ish) way to get some of the way there using a Views custom block.

1. Create a custom block with Title and Updated Date and filter by the "Node Type" you want to use and "Published".

2. In the Updated Date field change the format to Custom and enter "Y - F" to make dates show as e.g. 2010 - June.

3. Under Basic Settings - Style choose HTML List and then group this list by Updated Date.
You should then get an output like this:

2010 - June
- News item 1
- News item 2
2010 - July
- News item 3
- News item 4

4. Use a bit of jQuery to hide the lists and show them when the Updated Date field is clicked on.

Unfortunately you don't be able to group within groups (i.e. have a group for the months inside the Years) so you can't have more than one layer of expansion. Does anyone have any ideas for this sort of functionality?

Also I can't think of a way (only using the Views admin tools) to get the number of posts in each group to show up.

Anonymous’s picture

Thanks this was useful to get me started. I just wrote a blog post on this with some more detailed instructions, and some jQuery to go with it: http://www.only10types.com/2010/12/drupal-collapsible-blog-archive-like....

cduwe’s picture

Thanks for the post. Any ideas on how to get the two-level effect like you have on your blog?
▼2010
▼November
▼May
▼April
▼2009
▼2008

subu.purohit’s picture

Hi cduwe,

Have you found any solution for this requirement. I need the same functionality.

terryprogetto’s picture

empty string

topdillon’s picture

which module?

adammalone’s picture

I've written a similar thing and included some views exports/js files to use which should help you implement what I use!

http://www.adammalone.net/post/replicating-blogger-blog-archive-drupal

topdillon’s picture

Does you module provide a link to each of the previous years or does it continue with a link for each month in each previous year with the year stated beside it as seen in your demo?

adammalone’s picture

It's not really a module - just a view and a little bit of jQuery.

At present it is just month - year but I'm sure an actual module could be written to fulfill these needs though.

topdillon’s picture

Thanks.

That would be what everyone would love to see, but which no one seems to have conquered.