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 doesn't work when I use other numbers in last segment

October 08, 2010 10:24am

Subscribe [4]
  • #1 / Oct 08, 2010 10:24am

    jefinho

    26 posts

    Hi there,

    Somehow pagination doesn’t work when when I want to filter out entries from a particular year. To do that I use the the last segment. Like so:

    http://www.mydomain.com/archive/2010
    go to page 2 (doesn’t work):
    http://www.mydomain.com/archive/2010/P2

    I guess it has to do with ‘2010’ cause that’s a number

    This (when I show all entries) does work:

    http://www.mydomain.com/archive/
    go to page 2:
    http://www.mydomain.com/archive/P2


    How can I solve this problem?

    Thanks!

  • #2 / Oct 08, 2010 11:02am

    Ingmar

    29245 posts

    What version and build of EE are you using? Any extensions? Can you show us a link, perhaps?

  • #3 / Oct 08, 2010 11:59am

    jefinho

    26 posts

    I’m using version 2.1.0 - Build: 20100712

    I use the following extentions:
    * Last Segment
    * Matrix


    This is the way how I filter the year:

    {exp:channel:entries channel="mychannel" disable="member_data|trackbacks" year="{segment_3}” limit=“1” paginate=“bottom”}

    This site I’m working on still isn’t finished, but I can give some links for you to see the problem.

    Pagination works:
    http://www.mydomain.com/archive/en

    Pagination doesn’t work:
    http://www.mydomain.com/archive/en/2010


    Thanks!

  • #4 / Oct 08, 2010 4:50pm

    Sue Crocker

    26054 posts

    Is last_segment supposed to help with pagination?

  • #5 / Oct 08, 2010 4:57pm

    jefinho

    26 posts

    No, last segment has to help me to check the country code (nl, de, en).
    Check out the plugin:
    http://devot-ee.com/add-ons/bjorn-last-segment/

    I use following global variable: {last_segment}
    this means it will never be the pagination segment ie /P1

    You think this has to do with the problem?

    Thanks!

  • #6 / Oct 09, 2010 4:00pm

    Greg Salt

    3988 posts

    Hi Jefinho,

    It’s possible, I have no experience of that plugin. However, in you example code you are passing segment_3 as the year but your URI structure has it at segment_2. Are you building these URIs manually or are you using the Channel Archive tag?

    Cheers

    Greg

  • #7 / Oct 09, 2010 4:41pm

    jefinho

    26 posts

    Thank you for your reply!
    I don’t use the Channel Archive tag; I use a plugin called Yearlist (Ryan Irelan) to build the URIs.

    I don’t know if it has anything to do with the way I filter out the year by segment.
    Somehow it has to do with the fact that I use a number, cause here pagination works:

    http://www.mydomain.com/archive/en/blabla

    And here it doesn’t:

    http://www.mydomain.com/archive/en/nl/2010

    I have the feeling the lastsegment-plugin is messing things up. I’ll test it out without the plugin.

    Thanks

  • #8 / Oct 10, 2010 2:53pm

    Greg Salt

    3988 posts

    Hi Jefinho,

    Okay, let us know the results.

    Cheers

    Greg

  • #9 / Oct 11, 2010 10:11am

    jefinho

    26 posts

    I still don’t know the cause, but I’ve found a solution by adding an extra segment.

    This works:
    http://www.mydomein.com/archive/de/filter/2010

    This doesn’t:
    http://www.mydomein.com/archive/de/2010

    Even I don’t understand why, I am happy with the solution.

    Cheers

  • #10 / Oct 12, 2010 9:27am

    Sue Crocker

    26054 posts

    Glad you found a workaround. Don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases