I'm currently working on an EE site (2.5.5) and I currently have a setup in place where there are next/prev buttons displayed on the singular view templates for articles (Two channels: Articles & Interviews). The buttons link you chronologically from entry to entry spanning across channels which is great.
{exp:channel:entries channel="articles|interviews|travelling_tips"}
{exp:entries_list per_page="1" entry_id="{entry_id}" entry_series="{embed:all}"}
{if previous_entry_title}
<a class="content-nav prev" href="{previous_entry_channel_url}view/{previous_entry_url_title}">Previous Entry: {previous_entry_title}<span></span></a>
{/if}
{if next_entry_title}
<a class="content-nav next" href="{next_entry_channel_url}view/{next_entry_url_title}"><span></span> Next Entry: {next_entry_title}</a>
{/if}
{/exp:entries_list}
{/exp:channel:entries}
And the embed from the articles/view template (also interviews/view template):
{embed="embeds/related-articles"
entry_id="{entry_id}"
categories="{categories backspace='1'}{category_id}|{/categories}"
}
Where I'm running into a problem is when the client has a very specific set of criteria on how these buttons work.
If a user uses the search field and then clicks on an article from the search results page, she wants the next/prev buttons to only click through THE SAME channel bringing up more relevant stories. Currently in the search results if you click on an article it will take you to the articles/view template.
My question is how would I best approach this? Would have have to make some sort of new view like search/view to display that article?
Thank you for your time! If I need to rephrase, please let me know.
EE 2.5.5 Entries List 4.2.2