ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Next/Previous Entry Linking not working

January 23, 2013 3:52pm

Subscribe [2]
  • #1 / Jan 23, 2013 3:52pm

    inflicted

    14 posts

    Hi,

    Been a while since developing my last EE website (I’m a designer… : )
    Now I’m building a weblog thingy but I can’t get the Next/Previous Entry Links to work.
    Must be doing something completely wrong.

    Simple version:

    <body>
    
    <div id="container">
    
    {exp:channel:entries channel="site" orderby="date" sort="desc" limit="1" rdf="off" dynamic="off"}
    
    <div class="entry">
     {title}
    </div>
    
    {/exp:channel:entries}
    
    </div>
    
    <div>
    
    {exp:channel:next_entry}
    Next entry: <a href="http://{path=site/articles}">{title}</a>
    {/exp:channel:next_entry}
    
    {exp:channel:prev_entry}
    Previous entry: <a href="http://{path=site/articles}">{title}</a>
    {/exp:channel:prev_entry}
    
    </div>
    
    </body>
    </html>

    Hope you can help, thanks!

    Hugo

  • #2 / Jan 23, 2013 6:45pm

    wildrock

    262 posts

    Hi inflicted,

    You’re limiting your channel:entries tag to “1” which leads me to believe that this isn’t really a single entry page, as would be reflected in the url:  template-group/template/url_title.

    So you need to pass the single url_title to the channel:entries tag, and if that works, then the next_entry and prev_entry tags should work. Also, you might want to set the channel parameter in those tags too.

    And the “rdf” parameter is undefined for use as a channel:entries parameter, so you might want to nuke it.

    -jim

  • #3 / Jan 24, 2013 4:21am

    inflicted

    14 posts

    Thanks Jim, it took me a while, but I think I got the concept now. And it’s working! Thanks!

    Hugo

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases