I faced the problem that looks like pretty easy one yet I’m unable to sole that.
On my site there is a calendar of events (easy structure: the node ’calendar’ and subnodes for each event).
I need to output all events within 2 weeks from the current date, but, if there are too few such events (say, less than 3 events) then I need to output 3 nearest events.
I can understand how to code that in PHP, but Ditto (which I use to list events) won’t give me ability to use complicated queries like that one. Of course I can query for 3 nearest events, but what is there are 5 or 10 of it are within 2 weeks?
Can you please help me with my such a maze? Thank you in advance!