I’m having trouble getting my template routes to work with pagination & categories.
I have a basic blog which I’ve set up a route to remove the detail page name from the URL, so instead of http://www.mywebsite.com/blog/detail/entry-title-here, I have http://www.mywebsite.com/blog/entry-title-here.
I am using the following template route: /blog/{post:alpha_dash}
This works fine and categories also work fine. But when introducing pagination to the mix, I can’t seem to get pagination to work. Pagination URLs display nothing on the page.
I have segments required set to No. Running EE v 4.2.1.
What do I need to do to get pagination working?
Thanks for any help.
Hi,
Here is how we remove the “detail” template from the URL in ExpressionEngine, with the template set up you describe.
/blog/{url_title:regex[(((?!(P\d+|category\/)).)+?)]}
You’ll want to replace category
with the actual category separator word you have defined in your CP.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.