All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Show latest passed event, active event, immediately upcoming event

Milksamsa 24 Mar 2015 10:54 question, complete

{exp:low_events:entries channel="events" limit="3" show_passed="yes" show_upcoming="yes" unit="custom" date_from="-1 year" date_to="+1 year"}

It did work until the active date passed :)

I would like to obtain:


  • Past event

  • Active event

  • Upcoming event


  • The just passed event should be always in 1st position... the active in 2nd... the immediately upcoming in 3rd.

    How can I achieve this?

Replies

  1. Low 24 Mar 2015 11:12

    I think you'd be better off using 3 separate tags for this:

    {low_events:entries channel="events" unit="passed" sort="desc" limit="1"}

    {low_events:entries channel="events" unit="active" limit="1"}

    {low_events:entries channel="events" unit="upcoming" show_active="no" limit="1"}

  2. Milksamsa 24 Mar 2015 11:28

    Many thanks... that's what I thought.

  3. Edoardo Biasini 24 Apr 2015 08:15

    I really don't know why but the last query "upcoming" is not working anymore. Any chance you could look at my installation?

  4. Low 24 Apr 2015 08:50

    Define "not working". Showing the wrong entries? Showing no entries? Producing an error?

    Did you check the template debugger and looked at what that says? Maybe there aren't any upcoming entries, or the entries are negated due to status or future/expired dates?

  5. Edoardo Biasini 24 Apr 2015 08:52

    It's showing no entries. I double checked the expiry date and I'm sure the entries are there. Even if I use just the last query, it shows no entries. The query is executed in template debugger. It just won't return the upcoming events.

  6. Low 24 Apr 2015 08:54

    Ok, I'll need to take a look myself. Please send SuperAdmin login credentials to hi at gotolow dot com if you can.

  7. Edoardo Biasini 24 Apr 2015 08:58

    Ok. Thanks. I just sent it.

  8. Low 24 Apr 2015 09:09

    As I thought, the entry was negated due to the entry date being overwritten (as per the field's settings) and not having show_future_entries="yes" set to the tag.

    Remember, if you overwrite entry/expiration dates, be sure to add show_future_entries and show_expired to the tags, as those target the native entry/expiration dates.

  9. Edoardo Biasini 24 Apr 2015 09:12

    Ok. Many thanks.