I could swear this was working last week.
I've got Resource Router set up like so:
':url_title' => function($router) {
$router->setTemplate('addon/index');
$router->setGlobal('template', 'addon');
},
':url_title/faqs' => function($router) {
$router->setTemplate('addon/faqs');
$router->setGlobal('template', 'addon');
},
':url_title/changelog' => function($router) {
$router->setTemplate('addon/changelog');
$router->setGlobal('template', 'addon');
},
':url_title/documentation' => function($router) {
$router->setTemplate('addon/documentation');
$router->setGlobal('template', 'addon');
}
and it works.
However, I've just started to notice that if I try /blog the template that gets served is addon/index.
'blog' is not a URL title that exists in the database and this is happening for other template groups as well.
Like I say, this has been working and only just seeing it has stopped coming back to the project this morning.
If I were to alter my routes like:
'blog' => 'blog',
'blog/:url_title' => 'blog/post',
'voucher' => 'voucher',
'members' => 'member',
':url_title' => function($router) {
$router->setTemplate('addon/index');
$router->setGlobal('template', 'addon');
},
it works, but I'd rather rely on native EE routing for these template groups.