- This topic has 10 replies, 2 voices, and was last updated 6 years, 5 months ago by .
Viewing 11 posts - 1 through 11 (of 11 total)
Viewing 11 posts - 1 through 11 (of 11 total)
- The forum ‘How do I …’ is closed to new topics and replies.
Events Made Easy › Forums › How do I … › [eme_events] show only first event from recurrings
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!
If you only want to show one event, use limit=1 as an option to eme_events
but limit=1 all my other events are not shown.
i have a lot defferent events…
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.
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..
If you want to show specific events, use categories …
But with categories, it’s no longer dynamic based on the current date.
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
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']
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”
Thanks a lot! It works great!