We create Action Template for each Action Method and save it in particular folder create with the name of controller. This Action Template automatically attached with view based on the browsed URL.
An action template will be created in below location
/development/view/[Theme Name]/[Controller Name]/[Action Method Name].phtml
For example,
/development/view/rainbow/page/view.phtml
Now lets see an example.
Step 1: Set the debug mode = 1 in admin panel from below location:
Admin Panel > Preference > Configuration > Debug Mode
Step 2: Browse URL like below
{Website}/home/test
In this URL we are trying to access test page with below setting
Controller : Home
Action Method: testAction
Action Template : text.phtml
But you will see a debug page if the page not been created. Now create below file
/development/view/[Theme]/home/test.phtml
and add below Action Method in Home Controller
public function testAction(){
}
Browse the URL again. Now you can see the page if everything done correctly. We can customize the display by Layout.