Events Made Easy Forums How do I … [eme_events] show only first event from recurrings

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #58162
    Anonymous
    Inactive

    Hello,

    I have an event with multiple recurrings. I want to show in my list only the very first startevent if it’s in the future.
    I tried show_recurrent_events_once, but this shows me the first recurring event in the future…

    Can someone help me?
    Thanks a lot!

    #58163
    Franky
    Keymaster

    If you only want to show one event, use limit=1 as an option to eme_events

    #58164
    Anonymous
    Inactive

    but limit=1 all my other events are not shown.
    i have a lot defferent events…

    #58165
    Franky
    Keymaster

    Then I don’t understand your question. [eme_events] with show_recurrent_events_once will show 1 occurrence for each recurrent event, so that seems what you want.

    #58166
    Anonymous
    Inactive

    Ok, eine example.

    I have these an event a, starting 20. June 2018, recurring every week for 10 timew and an event b, starting 1. July 2018, recurring every week for 10 times.

    So I want to see in my list

    – event b 1. July 2018.

    Event a starts in the past, I dont wanna so it and event b starts in the future, so I wanna see the first occurence of this.

    I hope this makes it clearer..

    #58167
    Franky
    Keymaster

    If you want to show specific events, use categories …

    #58169
    Anonymous
    Inactive

    But with categories, it’s no longer dynamic based on the current date.

    #58170
    Franky
    Keymaster

    Well, if you really want to show just the first event in a recurrent series, you can check for that using conditional tags and the value of #_IS_FIRST_RECURRENCE

    #58171
    Anonymous
    Inactive

    Can you please provide an example, i tried the following things (without success)

    [eme_if tag='#_IS_FIRST_RECURRENCE' value='1']
    [eme_events scope=future]
    [/eme_if]
    [eme_events scope=future]
    [eme_if tag='#_IS_FIRST_RECURRENCE' value='1']
    [/eme_if]
    [/eme_events]
    
    
    [eme_events scope=future tag='#_IS_FIRST_RECURRENCE' value='1']
    
    #58173
    Franky
    Keymaster

    You have to use the eme_if tag inside the template for the eme_events entry, something like this:
    [eme_events template_id=44]
    And template with id=44:

    
    [eme_if tag='#_IS_RECURRENT_EVENT' value='1']
    [eme_if2 tag='#_IS_FIRST_RECURRENCE' value='1']
    <li>#_STARTDATE - #_STARTTIME<br /> #_LINKEDNAME<br />#_TOWN </li>
    [/eme_if2]
    [/eme_if]
    [eme_if tag='#_IS_RECURRENT_EVENT' value='0']
    <li>#_STARTDATE - #_STARTTIME<br /> #_LINKEDNAME<br />#_TOWN </li>
    [/eme_if]
    

    The default is defined in the option “Default event list format”

    #58186
    Anonymous
    Inactive

    Thanks a lot! It works great!

Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top