Page 1 of 1

News module - sortby="start_date" ?!

Posted: Mon Jul 02, 2007 11:54 am
by stix
Is there a way of sorting news items by start date?
I run a website for a music venue in Preston, UK.  We use the News module to list all the gigs & shows we have on, using the 'Post Date' field as the date of the gig.
At the top of each page (in a global content block) there's a marquee in which we want the last five shows that were confirmed to appear; so I've been trying to sort by the start date of each news item.
Anyone know how to do this?
I've tried just using sortby="start_date" and sortby="news_startdate", neither worked.
Thanks
Andy
http://www.53degrees.net

Re: News module - sortby="start_date" ?!

Posted: Thu Jul 31, 2008 8:33 pm
by vaughnt
I'm trying to do this too, and haven't found the answer in the forums.

I have a client who queued up three months of content, one item per day, in the news module.

He set start dates so the items would appear one per day.

We have a page where it only shows one item... unfortunately, that is being selected by post-date (I assume this corresponds to sortby='news_date'?), not start-date.

Also, we have an archive page, which shows all, but again these are in post-date order, not start-date.

How can we sort on Start Date?

Edit:
Note: the docs say:
(optional) sortby="news_date" - Field to sort by. Options are: "news_date", "summary", "news_data", "news_category", "news_title", "news_extra", "end_time", "start_time", "random". Defaults to "news_date".

But start_time is not the same as start_date, or so it seems. At least, sorting by start_time has no discernible effect.

Edit 2:
And as long as I'm asking questions, how do I modify the dateformat of the start date? In my summary template I have:

Code: Select all

<div class="NewsSummaryPostdate">
{$entry->startdate}
</div>
But  calling the module via {news category='Issue of the Day' dateformat='%B %d %Y'}  does not affect the output of startdate .