Chill_user Posted May 20, 2020 Share Posted May 20, 2020 Hello, in my controller I tried to display .tpl file. I have admin controller, it's working (controller created, tab created). My code in admin controller : public function initContent() { parent::initContent(); $this->setTemplate('module:mymodule/views/templates/admin/edit.tpl'); } But I have next error: Path is absolute, going to admin folder, but I need only to /test_web/modules/mymodule/views/admin/edit What can I do? Link to comment Share on other sites More sharing options...
PrestashopUser03 Posted November 5, 2021 Share Posted November 5, 2021 Hello, I have the same problem here, anyone can help ? Link to comment Share on other sites More sharing options...
ps8modules Posted November 5, 2021 Share Posted November 5, 2021 Admin or Front controller ? Link to comment Share on other sites More sharing options...
Ress Posted March 5, 2022 Share Posted March 5, 2022 (edited) You can try: public function initContent() { $this->content = $this->context->smarty->fetch(_PS_MODULE_DIR_.$this->module->name.'/views/templates/admin/edit.tpl'); parent::initContent(); } Edited March 5, 2022 by Ress (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now