News module - sortby="start_date" ?!

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
stix
New Member
New Member
Posts: 9
Joined: Mon Jul 02, 2007 11:29 am

News module - sortby="start_date" ?!

Post 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
vaughnt
Forum Members
Forum Members
Posts: 82
Joined: Tue Jun 13, 2006 2:05 pm

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

Post 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 .
Last edited by vaughnt on Thu Jul 31, 2008 9:07 pm, edited 1 time in total.
--
My photography: http://vaughnsphotoart.com
Festiva Resorts: http://www.festiva.travel
Post Reply

Return to “Modules/Add-Ons”