2

I'm trying to build a conference schedule and I would like each time slot entry in my channel to be ordered by the time designated in a custom field. My first approach used a text field {start_time} to enter the time the event begins. Then I set the entries tag to orderby="start_time" sort="as". Unfortunately, the output was as follows:

  • 11:00am - 11:15am | Break
  • 11:15am - 12:30pm | Breakout Session II
  • 12:30pm - 12:45pm | Break
  • 12:45pm - 2:15pm | Lunch & Keynote
  • 2:15pm - 2:30pm | Break
  • 2:30pm - 3:45pm | Concurrent Session III
  • 7:30am - 12:00pm | Conference Start Time
  • 8:00am - 9:00am | Breakfast Buffet
  • 9:00am - 9:45am | Opening Welcome and Remarks
  • 9:00am - 9:45am | Break
  • 9:45am -11:00am | Breakout Session I

I understand why this is happening and have looked into Low Reorder as a possible solution. But before I purchase I was wondering if there was another solution to this that would not involve entering the times in this format: 07:30am.

Thanks!

3 Answers 3

3

I would suggest you to use "Time Select" field type (http://devot-ee.com/add-ons/time-select) as it stores the time value as integer to orderby would work correctly with parameter orderby="start_date".

1
  • Worked like a charm! Thank you for your help.
    – cscott
    Apr 24, 2013 at 12:24
1

This plugin may be of help to you as well. http://gotolow.com/addons/low-events

One other possible idea is store it in military time and then date format on display: http://ellislab.com/expressionengine/user-guide/templates/date_variable_formatting.html

0
0

The orderby parameter does funky things when you want it to order by a date field that isn't native (like entry date). Solspace has a free add-on that should solve your problem - the Date Field Filter add-on re-maps the date-related field, giving you the same kind of ordering behaviour you would get if you were using the entry date as your start time field. What you wind up with is:

{exp:channel:entries channel="your_channel" date_field="your_custom_date_field" orderby="your_custom_date_field" sort="asc" limit="##" dynamic="no" disable="whatever_you_disable"}

you date info here

{/exp:channel:entries}

There are also date_field_start and date_field_stop parameters as well. I've used it a few times to better control ordering entries by custom date fields, and it has worked great.

Hope that helps.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.