Jump to content

Parent Theme not followed in the Controller Template


beginner1

Recommended Posts

Hi I have created a controller in which I am setting the template. It is a front controller. The problem I am getting is that the parent theme is not followed in the controller rather I just get another page uniquely all by itself and by the looks of it it is like that the template is not attached to the module. Currently the controller is just basic. I have attached the controller code. The code of my tpl file is also added. I have attached an image to show the problem.I haven't done any changes elsewhere just calling the controller from the module.php file by the link. Thank you in advance.

 

//controller code

class ExperimentFirstPageModuleFrontController extends ModuleFrontController
{
public $ssl = true;

public function __construct()
{
    $this->bootstrap = true;
    parent::__construct();
    $this->context = Context::getContext();
}

public function initContent()
{
    parent::initContent();
    $this->context->smarty->assign(array());
    $this->setTemplate('module:experiment/views/templates/front/list.tpl');
}

public function setMedia()
{
    parent::setMedia();
    $this->addjQuery();
}
}

//tpl file
<h>hello</h>

Capture.PNG

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...