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
News module - sortby="start_date" ?!
Re: News module - sortby="start_date" ?!
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:
But calling the module via {news category='Issue of the Day' dateformat='%B %d %Y'} does not affect the output of startdate .
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>
Last edited by vaughnt on Thu Jul 31, 2008 9:07 pm, edited 1 time in total.