Learning NextCloud App Development

I just started learning about NextCloud app development, I guess I am trying to understand some basic things and any help would be appreciated it.

Question is around route/controller/content

In routes I have following
return [
‘routes’ => [
[‘name’ => ‘page#index’, ‘url’ => ‘/’, ‘verb’ => ‘GET’],
[‘name’ => ‘page#page2’, ‘url’ => ‘/page2’, ‘verb’ => ‘GET’],
[‘name’ => ‘page#do_echo’, ‘url’ => ‘/echo’, ‘verb’ => ‘POST’],

In PageController.php
public function index() {
return new TemplateResponse(‘homepage’, ‘index’); // templates/index.php

public function page2() {
		return new TemplateResponse('homepage', 'page2');  // templates/index.php


In navigation index.php

When I click on the “First level container” navigation link, I would like to see static page2.php. This is not working. I am new to the framework.