You need two routes:
'routes' => [
[
'pattern' => 'tours',
'action' => function () {
if ( $page = page('productlist') {
return $page->render();
}
$this->next();
}
],
[
'pattern' => 'productlist',
'action' => function () {
go('tours');
}
]
]
Additionally, you can override the url()
method of the productlist page in a page model. Example: Breaking content directory down by year/month to improve performance