1

This is a simple event listing. I want the output to list by "touring date" which is a custom date field. However, it doesn't seem to work.

  {exp:channel:entries channel="touring_calendar" dynamic="no" orderby="touring_date_and_time" sort="asc"}
  <div class="touring-details">
    <h2 class="touring-city">{touring_city_state}</h2>
    <h2 class="touring-show">{touring_show_name}</h2>
    <h2 class="touring-venue">{touring_venue_name}</h2>
    <h2 class="touring-date"> {touring_date_and_time  format=" %F %j, %Y; %g:%i %a"}</h2></div>
  {/exp:channel:entries} 

It seems to be listed by "entry date" not the custom date field I created. I am stuck!

2
  • Well syntax seems good to me. You can raise a support ticket on Elislab Oct 8, 2018 at 17:30
  • 1
    Can we assume the field type is actually set to "date"?
    – Jim Wyse
    Oct 15, 2018 at 12:50

1 Answer 1

0

So I ran a test for you. I added a date field to a channel in my sandbox. I added this data to several entries. I can control the ordering based on that field with:

{exp:channel:entries channel="pages" orderby="datetest" sort="asc"}
{count} - {title}<br/>
{/exp:channel:entries}

This works as expected. You can watch the order flip when the sort parameter is changed.

Your Answer

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

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