Rendering a View Object
Example of a GET route /account/activate
rendering a view:
$router->get('/account/activate', function() use ($app) {
$factory = $app->make(\Concrete\Core\Http\ResponseFactoryInterface::class);
$view = new \Concrete\Core\View\View(‘/account/activate/form’);
$view->setThemeHandle(‘green_salad’);
return $factory->createResponse($view->render());
});
\Concrete\Core\View\View does not have a method named setThemeHandle, going as far back as 8.2.1 and as far forward as 9.1.3.
Found here https://documentation.concretecms.org/9-x/developers/security/route#heading-22
Additionally, in code blocks, it would be better if the code used straight quotes (’ ") instead of curly (ie: typesetter) quotation (’) marks.