Jump to content

D3S1GN

Members
  • Posts

    1
  • Joined

  • Last visited

Profile Information

  • First Name
    Carlos
  • Last Name
    Pastor

D3S1GN's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi. I'm doing a module for PS 1.6.1.5 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...