Closed carstengrimm closed 2 years ago
site->visit can take a pageobject as param. so that should indeed work.
'pattern' => '(?:(^[a-z]{2})//?)?(:all)/(:alpha)',
'action' => function ($language, $link, $key) {
$page = bolt($link);
if($page = site()->visit($page, $language)){ // as you can see we basically do a similar thing here...
$data = [
'key' => $key,
];
return $page->render($data);
}
}
I have been wondering if Bolt is also working for pages which are called by other means other than page('uri')
For example i am having a route which is doing a minor task and it's also basically getting a page by the uri in this case a multi-language setup. Anyhow, would i be able to increase the lookup/rendering in this kind of case as well?