<?php
class UserController extends ControllerBase
{
public function initialize(){
Tag::setTitle('User');
$this->view->setLayout('user');
parent::initialize();
}
public function indexAction(){
echo"Hello user";
}
public function goodbyeAction(){
echo"goodbye";
}
}
when I execute indexaction it uses my user layout which displays the code on my browser
<section class="container">
<div class="row">
<div class="col-md-12">
<p>hello user </p>
</div>
</div>
</section>
when I execute goodbyeaction it just simply shows "goodbye" when I view source. What I want is it also uses the user layout just like what the indexaction does.