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.

Custom Pagination Positioning

August 11, 2011 7:06pm

Subscribe [3]
  • #1 / Aug 11, 2011 7:06pm

    Mattias01

    55 posts

    Hi guys,

    I did have a dig around but couldn’t really find a EE2 solution for this…

    I have a list of entries.

    I only want to display x amount of entries, then add a next/prev link to load the next x amount of entries.

    I can do this with pagination. But how do I position the pagination so a ‘previous’ link appears in the list before my entries and a ‘next’ link appears after them?

    In case your wondering why I’m doing this; I’m building an image carousel so the next and prev links would become arrows.


    thanks

    Matt

    Moved to Community Help forum by Moderator

  • #2 / Aug 11, 2011 7:59pm

    joni^

    20 posts

    Hi,

    as you can give your prev and next links different classes, you can style/position them via css. just use a wrapper div with position:relative; and place your links with position:absolute;

    would that work for you?

  • #3 / Aug 11, 2011 8:36pm

    Mattias01

    55 posts

    Yeah I have done it like that in the past, however this layout was a little trickier so it would have gotten messy, however I did find a solution.

    I used this plugin:

    MX Jumper

    http://www.eec.ms/add-ons/mx-jumper


    And here’s my code, I have built a thumbnail gallery with this, with next and prev arrows using pagination, here I’ve stripped out all my images etc to make it easy to read….

    <ul>
    
    {exp:mx_jumper:out_global}
                          
        {exp:channel:entries channel="my-channel" limit="10" paginate="bottom"}
            
            {paginate}
            
                {exp:mx_jumper:put name="pagination_prev"}
                    {if previous_page}
                        <li><a href="http://{auto_path}">Previous</a></li>
                        {/if}
                    {/exp:mx_jumper:put}
            
                           {exp:mx_jumper:put name="pagination_next"}
                          {if next_page}
                        <li><a href="http://{auto_path}">Next</a></li>
                       {/if}
                            {/exp:mx_jumper:put}
            
                   {/paginate} 
        
        <!-- this puts in the previous pagination link -->
        {pagination_prev} 
        
        <!-- here's the entries -->
            <li><a href="http://{title_permalink=mypath/}">{title}</a></li>
        
        <!-- this puts in the next pagination link -->
        {pagination_next} 
            
        {/exp:channel:entries}
        
    {/exp:mx_jumper:out_global} 
    
    </ul>

    hopefully thats some help to anyone trying to achieve the same thing

  • #4 / Aug 11, 2011 9:08pm

    Mattias01

    55 posts

    I think it still needs some work though,

    it seems to repeat the pagination links

  • #5 / Aug 12, 2011 9:58am

    Sue Crocker

    26054 posts

    Hi, mattias78. Since you’re working with third party code, let’s move this over to the Community Help forum for additional community support.

  • #6 / Aug 12, 2011 1:26pm

    Mattias01

    55 posts

    Thanks Sue,

    I’m working on this with Max over here

    http://www.eec.ms/forums/viewthread/235/

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

ExpressionEngine News!

#eecms, #events, #releases