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.

Change layouts with pagination

November 30, 2010 1:40pm

Subscribe [3]
  • #1 / Nov 30, 2010 1:40pm

    Hi all,

    I am creating a new site where users can view the sites content in different ways, I have 3 layouts (blog, grid, normal) I created a new template group called “layout” and all the layouts work perfectly.

    I use the following to call the layout via the top menu:
    mysite.com/layout/blog
    mysite.com/layout/grid
    mysite.com/layout/normal

    Each layout has a pagination code attached to it. Now the issue is if people click on the grid layout and are on page 5 if they click on the blog layout they will be taken back to the first page and have to click forward again to get to page 5 for that layout, is there a way of fixing that so if you are on page 5 on the grid layout and click on another layout you stay on the same page number but see another layout?

    (e.g. mysite.com/layout/blog/P5 -> mysite.com/layout/blog/P5)

    Everything else works but just have this minor issue that I hope someone can help me with 😊

    Thanks again in advance to anyone able to help.

    Tony

  • #2 / Nov 30, 2010 6:03pm

    Ingmar

    29245 posts

    Why not just use the segment containing the current pagination and build a link off that?

    http://example.com/layout/grid/{segment_3}

    Something like that anyway, wouldn’t that work?

  • #3 / Dec 01, 2010 2:33pm

    interesting…. hmmm… thanks Ingmar I will try that!

  • #4 / Dec 02, 2010 8:32am

    Sue Crocker

    26054 posts

    Let us know if that works for you..

  • #5 / Dec 02, 2010 9:05am

    YES!!! This worked perfectly 😊 so simple but did the trick. I thought it was going to be well complex to do.

    Thanks Ingmar!

  • #6 / Dec 02, 2010 5:51pm

    Ingmar

    29245 posts

    I’m glad to hear it worked 😊 please post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases