I think you'd have to do that with 2 separate calls. One for upcoming events sorted ASC logic tested against the current date to cut off older events, then for events older than the current date sorted DESC logic tested against the current date to cut off future events.
thanks, I thought about doing two calls, but was not sure how to working within the limit of 4.
- If there are 4 upcoming events I want to always show the next 4 upcoming events
- if there are say only 3 upcoming events left, I want to use the second call and pull in one past event to make up the four.
I think you're going to have to go to a custom snippet for that.
ok thanks, does anyone know if you can get the total of resources retrieved by getResources (after filtering)?
You have the idx for that.
idx is a placeholder, how would you use it to determine the need for a second call?
thanks niz-z pretty sure that will work!