exp:low_reorder:next_entry returns no results on MSM
Even though exp:low_reorder:entries works on all my sites in my multi site setup, exp:low_reorder:next_entry only works on the default_site.
I tried wrapping the tag in a exp:channel:entries tag, no results...
I added site="default_site" inside exp:low_reorder:next_entry, no results...
I added a prefix tag to prevent conflicts...
I am wondering if this is a bug, or if I am missing a vital step -
I ran out of options, here is my code:
{exp:low_reorder:next_entry set="{embed:orderset}" site="default_site" url_title="{embed:ordertitle}" prefix="pfx_"}
<a href="{embed:root}/{pfx_url_title}">Next: <strong>{pfx_title}</strong></a>
{if no_results}
<strong style="display:none">no_results {embed:channel} {embed:orderset} {embed:ordertitle} {embed:root}</strong>
{/if}
{/exp:low_reorder:next_entry}
Any suggestion, are highly appreciated.
Replies
Low 26 May 2014 08:13
What are your EE, Low Reorder and PHP versions? Also, can you turn on template debugging and copy/paste all the lines that mention Low Reorder here?
Low 26 May 2014 08:24
Looks like the url_title lookup only looks in the current site. If you nest the next_entry tag inside the Entries tag, and use the entry_id parameter instead, you should be able to work around it.
Roland 26 May 2014 08:56
EE 2.8.1
Low Reorder 2.2.3
PHP 5.3.27
I tried the entry_id solution and now it is returning on all MSM results.
Problem now is that it only shows the active entry as next entry.
here is my code:
{exp:channel:entries channel="{embed:channel}" site="default_site" url_title="{embed:ordertitle}" dynamic="no"}
{exp:low_reorder:next_entry set="{embed:orderset}" site="default_site" entry_id="{entry_id}" }
<a href="{embed:root}/{url_title}">Next: <strong>{title}</strong></a>
{if no_results}
<strong style="display:none">no_results {embed:channel} {embed:orderset} {embed:ordertitle} {embed:root}</strong>
{/if}
{/exp:low_reorder:next_entry}
{/exp:channel:entries}
Low 26 May 2014 09:13
Do use the prefix option when nesting the tags to avoid conflicts with the vars.
Roland 26 May 2014 09:29
Perfect! this worked, thank you so much. You saved my holiday!
Just a recap what my code looks like for anyone that might have similar issues:
This is the embed snippet in my MSM templates
{exp:channel:entries channel="my_channel" site="default_site" url_title="{segment_1}" dynamic="no"}
{embed="default_site:_partials/_nextentry" channel="my_channel" orderset="my_set" entry_id="{entry_id}"}
{/exp:channel:entries}
This is the partial (_nextentry.php) with the low_reorder code:
{exp:low_reorder:next_entry set="{embed:orderset}" site="default_site" entry_id="{embed:entry_id}" prefix="pfx_" }
<a href="{embed:root}/{pfx_url_title}">Next: <strong>{pfx_title}</strong></a>
{if no_results}
<strong style="display:none">no_results {embed:channel} {embed:orderset}{embed:root}</strong>
{/if}
{/exp:low_reorder:next_entry}
Low 26 May 2014 09:35
Cool, glad you got it working. Will get the url_title issue fixed.
Roland 26 May 2014 10:15
Thanks again and Happy Memorial Day!