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.

Pagination not showing on second page

September 20, 2010 12:05pm

Subscribe [4]
  • #1 / Sep 20, 2010 12:05pm

    webvox

    25 posts

    Using EE 2.1

    I’m displaying a series of entries with a dynamic limit parameter and pagination. The limit works fine and pagination appears correctly on the first page but doesn’t appear at all on the second page.

    The pagination code is straight from the online guide:
    {paginate} {pagination_links} {/paginate}

    And my channel tag is:

    {exp:channel:entries channel="products" status="open" dynamic_parameters="limit|category" 
    paginate="both" sort="asc" disable="member_data"}

    Any suggestions on why pagination only shows on one page? Let me know what other information I can provide.

  • #2 / Sep 20, 2010 10:59pm

    Lisa Wess

    20502 posts

    Hi, galadan - you are going to need a different approach for this if you need pagination, dynamic parameters do not work with pagination:

    Note:  If you have pagination links on your page they will not retain the page layout options created dynamically using this feature.

  • #3 / Sep 21, 2010 1:23am

    webvox

    25 posts

    Hi, Lisa. Thanks for replying.

    Looks like my code was cut off in my post. The dynamic parameter I’m using is limit so a visitor can view 24 entries per page. If I’m understanding this right, if I use a dynamic limit on my entries, I can’t use pagination?

  • #4 / Sep 21, 2010 11:16am

    Sue Crocker

    26054 posts

    As Lisa mentioned, if you want dynamic parameters you won’t be able to have pagination work. But if you just use a limit=“24”, and nothing is dynamic, the pagination will work.

    Does that help?

  • #5 / Sep 21, 2010 11:38am

    webvox

    25 posts

    Thank you, Sue. I wasn’t being difficult. Just making sure I didn’t misunderstand.

    I’m not a programmer so I’m not going to say this should be easy to implement, but I do think this should be standard functionality. I’ve researched dozens of sites in preparation of building my own, and the majority of the major sites all include both pagination and dynamic filters. It seems as common now as using PNGs for images. Is there any chance this might be something added in a future release?

    Also, any suggestions for a way to get around this limitation?

    I appreciate your help!

  • #6 / Sep 21, 2010 2:14pm

    Lisa Wess

    20502 posts

    galadan -

    do you need users to be able to change the limit?  That would be when you would use dynamic parameters.  Otherwise, just set the limit using limit= and pagination will go off of that.

    See The Importance of Semantics: Pagination

  • #7 / Sep 21, 2010 2:50pm

    webvox

    25 posts

    Hi again, Lisa!

    What I need is the ability to allow users to manage how the content is presented through filters and limits, and have the ability to page through results. On the project I’m working on now, I could have a hundred or more products, each belonging to multiple categories (Men, Warmer, Hunt, Running, etc.). I’d like the user to be able to say “show me 24 items and sort them by warmth,” and then be able to page through those results.

    If this were an unusual expectation, I’d write it off as wishful thinking. But this appears to be standard functionality for many sites, and with EL working hard to establish EE as a best-of-class CMS, this is something they may want to take a serious look at. It’s really tough to explain why I can’t give this functionality to a client (or boss) when they’ve just looked at 20 sites that use some combination of pagination and dynamic parameters.

    I did submit a feature request and I’m sorry for the rant. I know you and the team take a lot of heat because you can’t be all things to all people. I’m just frustrated because I’ve fallen in love with ExpressionEngine (twice), but now it’s like I got married and moved my girl to L.A., only to find out she can only ride in the car if I keep the speed under 25 MPH.

    For now I’ll simply not limit the number of products shown and allow my users to sort and filter the results. They’ll gain more from that.

    Sorry if I’ve been beating a dead horse. Thanks for your help.  : )

  • #8 / Sep 21, 2010 2:55pm

    Lisa Wess

    20502 posts

    It is possible that you could use segments to pass that information; dynamic parameters are not the only way.

  • #9 / Sep 22, 2010 10:35am

    webvox

    25 posts

    Hearing that there may be other approaches is music to my ears.  : )

    I hadn’t considered using URL segments: I’m still new with EE so I’m afraid I have very little knowledge of managing URL segments dynamically. Can this be done using dropdowns on the results page?

    Also, I’m wondering if using custom fields would help me accomplish what I need. If I create a custom field called {limit-entries} and used it within the channel code as limit=“limit-entries}”, I would only need to trigger a refresh of the page, correct?

    Or is this a half-vast way to do this?  : )

  • #10 / Sep 23, 2010 3:46am

    John Henry Donovan

    12339 posts

    galadan,

    Without going into too much detail, to explain what Lisa means.

    You could construct your own URL like this for example by whatever means, dropdown, link etc

    http://www.yourdomian.com/index.php/products/category/category-name/24/warmth/

    You can pull anything from that URL into your tags using segments

    {exp:channel:entries channel="products" status="open" limit="{segment_4}" paginate="both" sort="asc" disable="member_data" search:warmth="{segment_5}"}

    Does that help?

  • #11 / Sep 23, 2010 6:38am

    webvox

    25 posts

    Thanks for the example, John. Seeing it structured like that does help. I can see where this might be a workaround. Thanks for your help, everyone. Much appreciated!

  • #12 / Sep 23, 2010 4:15pm

    Ingmar

    29245 posts

    Glad to see that helped. Please post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases