Events Made Easy › Forums › Bug fixed or feature request implemented › #ALLEVENTS and #_NEXTEVENTS sorting order and: category parameter in shortcode
Tagged: locations
- This topic has 4 replies, 2 voices, and was last updated 1 year, 1 month ago by
Anonymous.
-
AuthorPosts
-
Thu 4 Aug 2022 at 19:40 #64497
Anonymous
InactiveHi Franky,
I get some unexpected results using the #_ALLEVENTS and #_NEXTEVENTS placeholder in my Locations list template when it comes to sort order
#_ALLEVENTS doesn’t seem to sort at all, also with parameter #_ALLEVENTS{ASC} or even #_ALLEVENTS{‘event_start ASC’} don’t seem to have any effect
#_NEXTEVENTS always sorts ascending for me. If I use #_NEXTEVENTS{DESC} the output is still sorted ascending.
This is the shortcode I’m using with the location list template and the event list template (all in EME settings)
[eme_locations eventfull=true category=2,4,5,6,7,8,9,10,12,15,17,18,19,20]
<li><p class="congressRoom">[eme_if tag="#ESC_LOCATIONID" ne=5][eme_if2 tag="#ESC_FIELD{2}" ne='External Location']Room: #_FIELD{1} | #_FIELD{3}| Floor: #_FIELD{2}[/eme_if2][/eme_if][eme_if tag="#ESC_LOCATIONID" eq=5]#_LOCATIONNAME[/eme_if][eme_if tag="#ESC_FIELD{2}" eq='External Location']#_LOCATIONNAME<br>#_FIELD{1}<br>#_ADDRESS<br>#_ZIP #_CITY[/eme_if]</p> <ul class="eme-locationEventlist">#_NEXTEVENTS{DESC}</ul> </li>
<li class="eme-locationEvent"><strong>#_STARTDATE{D d/m}</strong> #_STARTDATE{G:i}h (#_STARTDATE{ga}) — #_CONTACTFULLNAME | #_EVENTCATEGORIES: <strong>#_LINKEDNAME</strong></li>
Finally, there’s something that I didn’t expect either:
Once a location is shown by the shortcode, #_NEXTEVENTS lists all the events of that location, regardless of the category parameter given in the shortcode. Is this the intended behavior?
I guess, I could work around that in my event list template with conditionals, which I’ve done for the time being, but still wanted to ask…[eme_if tag='#ESC_EVENTCATEGORYIDS' ne=1] <li class="eme-locationEvent"><strong>#_STARTDATE{D d/m}</strong> #_STARTDATE{G:i}h (#_STARTDATE{ga}) — #_CONTACTFULLNAME | #_EVENTCATEGORIES: <strong>#_LINKEDNAME</strong></li> [/eme_if]
Thank you!
Fri 5 Aug 2022 at 09:18 #64500Franky
KeymasterThis should fix it:
https://plugins.trac.wordpress.org/changeset/2766753/Fri 5 Aug 2022 at 10:25 #64501Anonymous
InactiveAwesome. You’re the man!
Sorting works now.
THANK YOU!Would you have time to respond to my other question about the category parameter in the shortcode not being taken into account when using #_ALLEVENTS/#_NEXTEVENTS? Is this the intended behavior?
Fri 5 Aug 2022 at 11:03 #64502Franky
KeymasterIndeed, #_ALLEVENTS/#_NEXTEVENTS don’t look at the categories for the location (also because location categories and event categories don’t necessarily need to be the same). So eme_if is the correct course of action there.
Fri 5 Aug 2022 at 12:10 #64504Anonymous
InactiveOK, great.
Thank you for clarifying. -
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.