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.

Showing previous/next posts on Permalink Page

November 12, 2012 6:59pm

Subscribe [1]
  • #1 / Nov 12, 2012 6:59pm

    simoneramo

    3 posts

    Hi just a little help with the best way of displaying all posts with a permalink page.

    For example a permalink page and in the footer you show all the other entries of that template group with a limit of 20?

    Is this done with pagination or relationships, cheers.

  • #2 / Nov 15, 2012 9:36am

    Dan Decker

    7338 posts

    Hi simoneramo,

    There are a few ways to approach this. If you want to use next/previous, we have a method for that:

    {exp:channel:next_entry}
        Next entry: <a href="http://{path=site/comments}">{title}</a>
    {/exp:channel:next_entry}
    
    {exp:channel:prev_entry}
        Previous entry: <a href="http://{path=site/comments}">{title}</a>
    {/exp:channel:prev_entry}

    I you want numbered paging, we have that covered too:

    {exp:channel:entries channel="news" orderby="date" sort="desc" limit="1" paginate="bottom"}
        <h2>{title}</h2>
    <p>    {summary}<br />
        {body}</p>
    
    <p>    {paginate}<br />
            Page {current_page} of {total_pages} pages {pagination_links}<br />
        {/paginate}<br />
    {/exp:channel:entries}

    You can even show one entry on the page and have a block for a list of other entries in the same or even different channels.

    Cheers!

  • #3 / Nov 20, 2012 7:55pm

    simoneramo

    3 posts

    thanks

    i used just used..

    {exp:channel:entries channel="projects" limit="20" dynamic="no"} 

    {/exp:channel:entries}

    setting the dynamic to “no” solved my problem..

    any ideas how to omit the current permalink page you are on from the limit of 20?

    cheers for the help.

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

ExpressionEngine News!

#eecms, #events, #releases