Hi all!
I currently am removing a parent folder from the URL with:
c::set('routes', array(
array(
'pattern' => '(:any)',
'action' => function($uid) {
$page = page($uid);
if(!$page) $page = page('posts/' . $uid);
if(!$page) $page = site()->errorPage();
return site()->visit($page);
}
),
array(
'pattern' => 'posts/(:any)',
'action' => function($uid) {
go($uid);
}
)
));
I want add another parent folder to this route β locations/.
How would I go about adding this in?
Or, better yet, is there a way to remove all parent folders that isnβt name specific?
Cheers