I found the info under ‘17 (Recipes) - Creating a New Page’ We are trying to add an additional navigation link to a ‘Help’ page.
I cp’d the ‘app\sprinkles\admin\templates\pages\dashboard.html.twig’ to a new ‘help.html.twig’. I’ll probably rip the stuff that requires DB access out before I try the next few steps.
I created a simple ‘app\sprinkles\admin\src\Controller\HelpController.php’.
/** @var UserFrosting\Sprinkle\Account\Authorize\AuthorizationManager */
$authorizer = $this->ci->authorizer;
/** @var UserFrosting\Sprinkle\Account\Database\Models\User $currentUser */
$currentUser = $this->ci->currentUser;
// Access-controlled page
if (!$authorizer->checkAccess($currentUser, 'uri_activities')) {
throw new ForbiddenException();
}
return $this->ci->view->render($response, 'pages/help.html.twig');
}
The page still does not render, so I’m guessing I need to run the ‘php bakery bake’? I’m asking first before I screw this installation up!