Hi,
tried setting both to orderby=“date” and sort=“asc”, no difference.
FYI, two more tests…
a) if I put this code a the top of the blog article page (single post)...
{exp:entries_list channel=“news” category=“9|14” site=“3” status=“open|closed” sort=“asc”}
{title}<br>
{entry_id}<br>
{/exp:entries_list}
with a URL of “weddings/article/95” then I get…
New storybook and digital packages
95
New storybook and digital packages
95
...surely this should appear once?
2) if I put this code on the blog listing page…
{exp:entries_list channel=“news” category=“9|14” site=“3” status=“open|closed” sort=“asc” orderby=“date”}
P= {previous_entry_title}<br>
P= {previous_entry_id}<br>
C= {title}<br>
C= {entry_id}<br>
N= {next_entry_title}<br>
N= {next_entry_id}<br>
<hr>
{/exp:entries_list}
...I get…
P=
P=
C= Welcome to the blog
C= 20
N= Welcome to the blog
N= 20 —————
P= Welcome to the blog
P= 20
C= Welcome to the blog
C= 20
N= Wedding questions answered, plus sharing
N= 88 —————
P= Welcome to the blog
P= 20
C= Wedding questions answered, plus sharing
C= 88
N= Wedding Photography, another point-of-view
N= 74 —————
P= Wedding questions answered, plus sharing
P= 88
C= Wedding Photography, another point-of-view
C= 74
N= Royal Photographic Society Qualification
N= 94 —————
P= Wedding Photography, another point-of-view
P= 74
C= Royal Photographic Society Qualification
C= 94
N= Royal Photographic Society Qualification
N= 94 —————
P= Royal Photographic Society Qualification
P= 94
C= Royal Photographic Society Qualification
C= 94
N= New storybook and digital packages
N= 95 —————
P= Royal Photographic Society Qualification
P= 94
C= New storybook and digital packages
C= 95
N= New storybook and digital packages
N= 95 —————
P= New storybook and digital packages
P= 95
C= New storybook and digital packages
C= 95
N= Website changes - easier to use contact forms
N= 96 —————
P= New storybook and digital packages
P= 95
C= Website changes - easier to use contact forms
C= 96
N=
N= —————
which is clearly wrong:
loop 1, next = current
loop 2, repeated entry - same entry (current) as loop 1 (entry 20) but previous now = current
loop 3, okay
loop 4, okay
loop 5, next = current
loop 6, repeated entry - same entry (current) as loop 5 but previous now = current and next is correct
loop 7, next = current
loop 8, repeated entry - same entry (current) as loop 7 but previous new = current and next is correct
loop 9, okay
and I only have 6 entries - ie why 9 not 6 loops?
I know you are concerned that it’s a disparity between the EE sorting and the sorting of your code but it seems clear from this second test that there is something seriously amiss here. Unless I am totally misunderstanding what {previous_entry_title}, {previous_entry_id}, {next_entry_title} and {next_entry_id} are supposed to do.
Doing the same with EE’s code…
{exp:channel:entries channel=“news” category=“9|14” site=“3” status=“open|closed” sort=“asc” orderby=“date” dynamic=“no”}
C= {title}<br>
C= {entry_id}<br>
<hr>
{/exp:channel:entries}
...gives…
C= Welcome to the blog
C= 20 —————
C= Wedding questions answered, plus sharing
C= 88 —————
C= Wedding Photography, another point-of-view
C= 74 —————
C= Royal Photographic Society Qualification
C= 94 —————
C= New storybook and digital packages
C= 95 —————
C= Website changes - easier to use contact forms
C= 96 —————
...which is the correct 6 entries, in the correct order.
|