Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-07-03 13:21:37

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

article_custom for a the last n days/months/years

Hi.
I’m using article_custom to spit out some articles in a tabular format. I’d like to restrict the output to articles in the past n days, weeks or months – the actual value of n isn’t important (or decided), but what I haven’t figured out is the method of the rolling date. I can use month to hard-code a month in, and perhaps kludge the output a little by using php to populate the current and previous month in month, but is there a way I can make it happen more cleanly?

Thanks for any pointers.

Pete

Offline

#2 2012-07-03 13:41:49

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: article_custom for a the last n days/months/years

I’d use csb_if_newer_than, a 5 (or so) lines plugin.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2012-07-03 13:48:12

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Re: article_custom for a the last n days/months/years

Thanks, uli – perfect.

Offline

Board footer

Powered by FluxBB