Closed jonathanstegall closed 6 years ago
Actually I think I figured this out, reading more about FastRoute. Here's what is working for me:
$routes->addRoute( new QueryRoute(
$title . '[/page/{page:\d+}]',
$query,
[
'paged' => true,
'template' => 'my-template.php',
]
));
With this, /my-spill/
works, and also /my-spill/page/2
.
I'm finding this difficult to understand. In
/brain/cortex/src/Cortex/Route/PriorityRouteCollection.php
, I notice this code:My route is like this:
I've tried changing the
paged
value betweentrue
,1
, and the page number that I want to use (ex2
), but so far I am only able to get the first page of the paginated query to run.In other words,
/my-spill/
works, and it loads the first 10 posts from$query
as it should, but/my-spill/page/2/
returns my theme's 404 page.