More than one entries loop per template doesn't seem to work.
This is very strange to me:
On a template, I have two separate Low Events entries loops: one for an "in brief" sidebar, and another later on the page for a detailed view.
The problem is that only the first one works as I expect it: it pulls the correct events (in this case a limit of 2).
The second entries tag renders only one event: the one most currently entered (not the closest event date to today).
If I remove the first loop, then the second works correctly.
They are not nested, by the way, and have identical parameters, e.g.:
{exp:low_events:entries channel="events" sort="asc" show_passed_events="no" limit="2"}
{/exp:low_events:entries}
Am I missing something basic here?
Replies
Low 15 Aug 2012 08:06
Hi Adam,
Can you try and apply this fix and see if that helps?
Adam McIsaac 15 Aug 2012 13:33
Applied the fix, but now the second loop returns no results. The first loop still works fine.
Low 16 Aug 2012 14:58
Apologies for the time it takes me to respond -- I'm on holiday at the moment, only checking support once a day. Normal support will resume next week.
I haven't been able to replicate this. What does your complete template look like? You can use http://pastie.org for larger chunks of code.
Adam McIsaac 16 Aug 2012 15:03
Not at all -- I'm sorry to interrupt your holiday.
Complete template is at http://pastie.org/4521828;
Events loops are at line 76 and at line 129.
I hope I haven't done anything terribly stupid.
Thanks, Low.
Low 16 Aug 2012 15:21
Just a quick reply before I sign off for today...
Can you turn on template debugging and look up all the lines starting with Low Events? Just copy/paste it here or make a screenshot of it. Thanks.
Adam McIsaac 16 Aug 2012 15:29
Sure. Here you go:
First loop:
Second loop:
Low 16 Aug 2012 15:34
Well, adding unit="upcoming" to the second loop might already help, although it shouldn't be setting the unit to "day" as the debugger is showing. Can you try and add unit="upcoming" to the second loop?
Adam McIsaac 16 Aug 2012 19:30
That worked. Weird.
Thanks, man. I hope you enjoy the rest of your holiday.