Events Made Easy › Forums › How do I … › [eme_events] show only first event from recurrings
- This topic has 10 replies, 2 voices, and was last updated 7 years, 5 months ago by
Anonymous.
-
AuthorPosts
-
Fri 22 Jun 2018 at 10:46 #58162
Anonymous
InactiveHello,
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!Fri 22 Jun 2018 at 11:19 #58163Franky
KeymasterIf you only want to show one event, use limit=1 as an option to eme_events
Fri 22 Jun 2018 at 11:23 #58164Anonymous
Inactivebut limit=1 all my other events are not shown.
i have a lot defferent events…Fri 22 Jun 2018 at 13:51 #58165Franky
KeymasterThen 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.
Fri 22 Jun 2018 at 15:32 #58166Anonymous
InactiveOk, 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..
Fri 22 Jun 2018 at 21:28 #58167Franky
KeymasterIf you want to show specific events, use categories …
Sat 23 Jun 2018 at 05:48 #58169Anonymous
InactiveBut with categories, it’s no longer dynamic based on the current date.
Sat 23 Jun 2018 at 07:38 #58170Franky
KeymasterWell, 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
Sat 23 Jun 2018 at 12:00 #58171Anonymous
InactiveCan 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']Sat 23 Jun 2018 at 21:18 #58173Franky
KeymasterYou 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”
Thu 28 Jun 2018 at 08:54 #58186Anonymous
InactiveThanks a lot! It works great!
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.