Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • First Name
  • Last Name

D3S1GN's Achievements


Newbie (1/14)



  1. Hi. I'm doing a module for PS and after reading a lot of topics I'm getting a bit lost about the explanations to do customized backend pages. Default method (getContent()) works fine, but i want to do 2 or 3 pages for employees so there are needed a couple of controllers. I have created successfully a menu item linking to a new controller and it gets executed. First thing I don't fully understand is the difference between AdminController and ModuleAdminController. Second thing I need is to show a custom tpl file for this controller. class AdminMyCustomControllerController extends ModuleAdminController { //located at mymodule/controllers/admin/AdminMyCustomControllerController.php public function __construct() { $this->name = 'mycustomcontroller'; $this->version = '1.0.0'; $this->bootstrap = true; $this->table = 'example'; //for now not using objectModel to save data $this->className = 'AdminMyCustomController'; parent::__construct(); } public function initContent() { parent::initContent(); $smarty = $this->context->smarty; $smarty->assign('test', 'test1'); $this->setTemplate('mytemplate.tpl');//located at mymodule/views/templates/admin/mytemplate.tpl } Debugging until a SmartyException (blank page shown): "Unable to load template file 'C:\htdocs\rootFolder\adminblablabla/themes/default\template\mytemplate.tpl'" Why it is looking for it at admin and not in myModule's? Thank you.
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More