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.

Previous Page | Next Page navigation for gallery category pages

March 07, 2008 7:28am

Subscribe [1]
  • #1 / Mar 07, 2008 7:28am

    lndlyb4

    78 posts

    Hello,

    I am trying to add “Previous Page|Next Page” navigation to the category pages of my photo gallery. I used the gallery module to create it. Each category page has up to 8 thumbnails that link to detail pages for each product. Some of my categories have as many as 30 products, so I want to be able to navigate from page to page.

    I inserted the code below, but I can’t seem to get it to work. The links appear, but go nowhere. I would also like to add “page—of (total pages)

    {paginate}

    {if previous_page}
    Previous Page  
    {/if}

    {if next_page}
    Next Page
    {/if}

    {/paginate}

    thank you

  • #2 / Mar 07, 2008 1:30pm

    Paul Burdick

    480 posts

    I just tested on the current build of EE 1.6.2 and I can confirm that pagination will work on gallery category pages.  Perhaps you might give us an example of the link that is not working?  And it would not be a bad idea if you could give us the full tag, perhaps scaled down to only the barest necessities so we can try to reproduce the problem.

  • #3 / Mar 07, 2008 2:40pm

    lndlyb4

    78 posts

    Hi Paul,

    Thanks for responding.

    I think I got it working. Perhaps you can help me to understand how.

    I moved the pagination code into a different set of tags.

    For example, at first I had it within the tags below:

    {exp:gallery:entries gallery="{gallery_name}” orderby=“date” sort=“desc” columns=“4” rows=“2”}

    {/exp:gallery:entries}


    When I placed it in between the following tags, it worked.

    {exp:gallery:entries gallery="{gallery_name}” limit=“8” orderby=“date” paginate=“top”}

    {/exp:gallery:entries}

    Does this have to do with the parameters? Or, does the pagination code have to be inside the same tags that the thumbnail rows code is?

    thanks

  • #4 / Mar 07, 2008 2:52pm

    Paul Burdick

    480 posts

    As my test used the columns=”” and rows=”” parameters, I do not think it was the parameters even without checking the code.  Something you were doing was either making EE not see the pagination variable pair or think pagination was not needed, so I am not sure.  Good to see that it is working though.

  • #5 / Mar 07, 2008 4:13pm

    lndlyb4

    78 posts

    Thanks again.

  • #6 / Mar 26, 2009 1:20pm

    bkuberek

    124 posts

    For example, at first I had it within the tags below:

    {exp:gallery:entries gallery="{gallery_name}" orderby="date" sort="desc" columns="4" rows="2"}
    
    {/exp:gallery:entries}


    When I placed it in between the following tags, it worked.

    {exp:gallery:entries gallery="{gallery_name}" limit="8" orderby="date" paginate="top"}
    
    {/exp:gallery:entries}

    the first example doesn’t have the parameter paginate=”“ specified. The second does. I believe that’s why it works for the second and not the first.

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

ExpressionEngine News!

#eecms, #events, #releases