Show a mix of future and past events

Another automation we did for Programming Librarian, a site for librarians to plan educational programs, involved events. They wanted to always feature 3 events on the home page, and the most important events were in the future. If their schedule is full, they wanted 2 future and 1 past event visible -- but they don't always have upcoming events, so there might be 0, 1 or 2 future events, and 3, 2, or 1 past events.

We solved this conundrum using the Events, Conditions, and Actions (ECA) module with two views -- one for the next 0 - 2 events in the future, and one for the most recent events in the past. With ECA, we could then draw from these views one event at a time to fill up our row of 3.

Advent 2024 -- 24 days of Automations

Add new comment

The content of this field is kept private and will not be shown publicly.

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <blockquote cite> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h1> <h2 id> <h3 id> <h4 id> <h5 id> <p> <br> <img src alt height width>
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.