1

We have a channel with events in it, and are utilizing Low Events. The design calls for a list of events, with Month Year as a heading, such as this:

January 2014

  • Event 1 Details
  • Event 2 Details

February 2014

  • Event 3 Details
  • Event 4 Details

... and so on.

I suspect I need to compare the month/year of entry i with that of entry i-1; if they're not the same, display the month/year of entry i. What's the best way of doing that?

It looks like EE has a native tag pair for handling this, {date_heading display="monthly"}, but that appears to be based on the entry_date, and not the value of my Low Events field. It appears that Low Events has the ability to sync the date of the events field with the entry_date, but would prefer to keep them unrelated if possible.

4

Try using the :first modifier to generate those headings.

1
  • You're a gentleman and a scholar; thank you! – Nick Benson Dec 18 '13 at 20:08
1

If that's a Stash build, you could simply use this method for ordering entries by month and then by year (or any variation). Used it on a recent build. Works flawlessly.

2
  • This is an excellent suggestion, but going with the :first modifier as it's much quicker to implement in this situation. – Nick Benson Dec 18 '13 at 20:07
  • Agree. Stash would be the solution for more complex cases. – Jérôme Coupé Dec 19 '13 at 5:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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