hello ... I've searched and can't find an answer to this one. I have an event listing which shows upcoming and previous events. For upcoming:
However as well as a standard single date event I need to allow the client to set up an event which has several dates or a date range (e.g. 26, 28, 30 September 2014). I would want this type of event to be ordered in the listing by the first/earliest date and to remain 'upcoming' until the last/latest date has past.
So I need 2 dates to work with - one for deciding upcoming/previous and another for ordering in date order. I'll use k_page_date to determine upcoming/previous - so will ask the client to set this to the last/latest date of a date range. And I've set up an extra editable field
Most of the events will be single dates and it would be nice if I don't have to ask the client to set up the same date in two places - e.g. Published date and my extra date_range_start date.
What I'm after is something along these lines: if nothing is entered for date_range_start set date_range_start to k_page_date. I'm not sure how to do this?
Thanks!
- Code: Select all
<cms:pages masterpage='diary-dates.php' order='asc' show_future_entries='1' start_on="<cms:date format='Y-m-d' gmt='1' />" >
- Code: Select all
<cms:pages masterpage='diary-dates.php' order='desc' stop_before="<cms:date format='Y-m-d' gmt='1' />" >
However as well as a standard single date event I need to allow the client to set up an event which has several dates or a date range (e.g. 26, 28, 30 September 2014). I would want this type of event to be ordered in the listing by the first/earliest date and to remain 'upcoming' until the last/latest date has past.
So I need 2 dates to work with - one for deciding upcoming/previous and another for ordering in date order. I'll use k_page_date to determine upcoming/previous - so will ask the client to set this to the last/latest date of a date range. And I've set up an extra editable field
- Code: Select all
<cms:editable type='datetime' group='date_group' name='date_range_start' format='dmy' allow_time='1' minute_steps='5' default_time='2000-01-01 00:00:00' label='First/earliest date of a date range or several dates' order='15' />
Most of the events will be single dates and it would be nice if I don't have to ask the client to set up the same date in two places - e.g. Published date and my extra date_range_start date.
What I'm after is something along these lines: if nothing is entered for date_range_start set date_range_start to k_page_date. I'm not sure how to do this?
Thanks!