How to create a new page in the panel

I wanna set up an analytics/stats page inside the panel, and I was wondering the steps I would take to do so.

If someone can provide me the steps to create a simple “Hello World” standalone page in the panel (Ex. /panel/helloworld) then I can very easily work from there using it as a guide to Kirby’s MVC design

It all starts with adding a new route in /panel/app/config/routes.php, e.g.

array(
    'pattern' => 'test',
    'action'  => 'TestController::index',
    'filter'  => 'auth'
  )

Within your new route, you define which controller to use, for test purposes, you can just copy an existing controller.

Then you need to add the new page to the menu, in /panel/snippets/menu.php.

Hope that’s enough for a starting point. Happy panel hacking :slight_smile:

1 Like