sorting by date - for blog archives

5 posts by 4 authors in: Forums > CMS Builder
Last Post: February 2, 2012   (RSS)

I would like to use CMS Builder to create a blog, but the pre-configured blog Section Editor does not include an archiving feature.

I would like all blog posts for the past 30 days to appear on the active blog page. Any posts dated 31 days or older, to be archived and categorized by month. For example, I'd have in the left or right column of the page:

ARCHIVES
July 2008 (links to all posts for this month)
June 2008 (links to all posts for this month)
May 2008 (links to all posts for this month)

I can figure out how to filter the active blog page to show only the past 30 days, but I don't know how to set up the archives as shown above. It seems that this link generation could be automated using some PHP date code, but I'm not familiar enough with PHP to know how to do this. Can anyone provide an example?

Re: [Donna] sorting by date - for blog archives

Donna,

The code you provided does exactly what I was looking for! Many, many thanks to you and your team for going above and beyond to come up with this. I'm sure it will be helpful to others here in the forum, too. I now feel confident in offering CMS Builder as a solution for site blogs. (And for me personally, CMS Builder is far easier to style to match a site design than trying to customize blog software templates.)

Thanks once again for your superior customer support!

Deborah

Re: [Donna] sorting by date - for blog archives

By sidcam - September 14, 2010 - edited: September 14, 2010

Donna-

YOU ROCK!!!

THANK YOU! THANK YOU! THANK YOU!

That was about the only feature of my old Wordpress blog I hadn't figured out how to mimic.

Sid

Re: [Donna] sorting by date - for blog archives

By InHouse - February 2, 2012

Wow! That's so much more elegant that the kluge that I came up with ages ago.

This is a fairly popular client request - and standard in my 'frameworked' CMS tools. Might be worth exploring this type of structure as an option in the "List View Generator". At the very least, it should be collected into the Very Useful Archive of CMSB Recipes.

J.