2

I have entry linking working in multiple templates on my current EE site. In one of my channels, when I get to the end of the loop, it's displaying a next link to an entry in a different channel. It is the next sequencial entry ID though. There isn't a previous link when i'm at the first entry in the loop. The entry that is displaying in the in correct channel shares the same parent page.

Here's my structure hierarchy

About Us
 - Leadership
   - has listing entries that have next/previous entry linking. Last entry has entry_id 106

 - Galleries
   - Video Galleries
     - Page 1 Child page with entry_id 107
     - Page 2

Next/Previous entry linking logic

<p class="next_prev_nav">
    {exp:channel:prev_entry channel="leadership"}
            <a href="/about-us/senior-leadership/{url_title}" title="{title}">Previous</a>
    {/exp:channel:prev_entry}

    {exp:channel:next_entry channel="leadership}
            <a href="/about-us/senior-leadership/{url_title}" title="{title}">Next</a>
    {/exp:channel:next_entry}
</p>

I tried to just do a quick hack and add entry_id="not 107" on the next_entry tag but that broke the next link for all listing pages. Entry ID 107 has it's own channel for videos, so it's not a rogue entry. Any one know how to fix this?

2
  • Are you running the latest of both Structure and EE? Mar 28, 2013 at 21:43
  • @TravisSchmeisser both are up to date.
    – Dan
    Mar 29, 2013 at 16:22

1 Answer 1

1

The fix: a quote was missing:

Bad

{exp:channel:next_entry channel="leadership} Next {/exp:channel:next_entry}

Good

{exp:channel:next_entry channel="leadership"} Next {/exp:channel:next_entry}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.