Adding a new link/page

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!

php bakery bake shouldn’t make any difference. You basically only need to run it when you add new assets. Even composer update won’t matter if your sprinkle is already setup.

Check the logs. It might be an issue with you controller.

There is nothing in userfrosting/app/logs.

I’m getting a 404. How is ‘pages/help.html.twig’ resolved?

Edit: I found my ‘route/help.php’ file was hosed!