0

I have created a template route for the typical blog scenario where I have an index template in a "blog" template group that lists blog posts along with a detail template that shows full blog posts.

I have my template route set up like so: Template Route

It works fine except for the pagination on the index page. I get 404 errors with pagination.

I have tried adding /{pagination} & /{pagination:pagination} to the end of the route along with trying to add /blog/{pagination} & /blog/{pagination:pagination} as a route for the index template but nothing works.

Any help on getting pagination to work with this is much appreciated.

Using EE v3.5.6.

0

What you need to do is add {page:pagination} to the end of the route. So something like:

/blog/{story:alpha_dash}/{page:pagination}

HTH

| improve this answer | |
  • I still get a 404 error. – mediapimp May 3 '17 at 12:43
  • There was a typo in the example route that I've corrected now - that pattern works just fine on my EE3.5.5 system, so if you are getting a 404 then something else is also going on... – JCOGS Design May 4 '17 at 9:06
  • I had it correct and it's still not working. I have no idea what's going on here. – mediapimp May 4 '17 at 12:54
  • Ok. So I just figured something out. I had dynamic="yes" because I'm also using categories to filter the blog list. With dynamic="yes" categories worked but pagination did not. Changing it to dynamic="no" fixed the pagination but now categories don't work. How do I get both of them to work together? – mediapimp May 4 '17 at 13:00
  • Probably you need to explicitly identify the category using a parameter within your channel:entries tag (or whatever you are using). How you do this depends on how your EE system is configured - but a common way is to simply identify the category along the lines of... category="x|y|z" where x, y, z are the category ids you want to include. Alternatively you can use one of the category manipulation plugins (like Low seg2cat or construct categories) and get the ID from a slug or some-such. – JCOGS Design May 4 '17 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.