ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Set start_on and stop_before parameters dynamically?

July 14, 2009 12:40pm

Subscribe [1]
  • #1 / Jul 14, 2009 12:40pm

    adamwiggall

    178 posts

    I have a weblog set up where the entry_date for an entry is a showtime (cinema site).

    For shows that are ‘Now Playing’ things are (reasonably) simple, use current_time format=’%Y-%m-%d %H:%i for the start_on, then a little php to calculate the stop_before seven days later. That all works nicely.

    The issue is that when a show starts within the next week it is categorized as ‘Now Playing’, however when the above date parameters are used it will only show the days remaining in the week from the start date, i.e. Show starts Friday, user looks on Monday, sees Friday, Satuday and Sunday, when we need them to see Friday for a week.

    So, I am looking for a way to set the start date dynamically from the date of the first entry returned, then add seven days onto this to get the stop_before date.

    I have thought about the exp:query tags, and whilst it is no doubt possible through that, I need to retain the availability of the date_heading=“Daily” to get some days outputted along with the dates and times.

    I can’t do a limit=“X” because there are a varying number of shows playing each day. e.g. if there were three a day I could do limit=“21” to assure I got only seven days.

    Unless I am missing something within the exp:query possibilities I am a little stuck.

    Anyone?

    Thanks,

    Adam

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases