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 Entry / Previous Entry with Counter < 15/50 >

July 08, 2012 10:59pm

Subscribe [2]
  • #1 / Jul 08, 2012 10:59pm

    thefifthlion

    133 posts

    If you’re looking to add an entry counter to your next/previous entry navigation like so < 15/50 > follow the example below.

    • you’ll need to customize a bit for things like status, path, and segment
    • “segment_3” should be your last segment {segment_2} or {last_segment} etc., the one with your entry title
    • make sure you have your entries to display by title permalink

    <ul class="portfolio-pagination">
    {exp:channel:next_entry channel="work" status="flagship|open"}
        <li class="prev"><a href="http://{path=%27work/show%27}" class="button medium no-bg"><span class="arrow left">»</span></a></li>
    {/exp:channel:next_entry}
    {exp:channel:entries channel="work" status="flagship|open" dynamic="no"}
        {if url_title == segment_3}<li>{count} / </li>{/if}
    {/exp:channel:entries}
    {exp:channel:entries channel="work" dynamic="no" status="flagship|open"}
        {if count == 1}<li>{absolute_results}</li>{/if}
    {/exp:channel:entries}
    {exp:channel:prev_entry channel="work" status="flagship|open"}
        <li class="next"><a href="http://{path=%27work/show%27}" class="button medium no-bg"><span class="arrow">»</span></a></li>
    {/exp:channel:prev_entry}
       </ul><!-- end .portfolio-pagination -->
  • #2 / Jul 09, 2012 4:29pm

    ChiefAlchemist

    913 posts

    Can you elaborate a bit on exactly what this does and why someone might want to do this?

  • #3 / Jul 09, 2012 4:37pm

    thefifthlion

    133 posts

    Updated the first line of the initial post to elaborate.

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

ExpressionEngine News!

#eecms, #events, #releases