Hello,
i have created a admin module with Module generator, added routes and want to use my own Admin Controller which renders a Twig Template.
The Side Link is working but the Controller opens the template without Prestashop Backend around the template.
AdminController without any Logics:
<?php
namespace EasyUpload\Controller;
use PrestaShopBundle\Controller\Admin\FrameworkBundleAdminController;
class DemoController extends FrameworkBundleAdminController
{
public function demoAction()
{
$content = $this->content;
return $this->render('@Modules/easyupload/views/templates/admin/index.html.twig', [
'content' => $content
]);
}
public function getContent()
{
/**
* If values have been submitted in the form, process.
*/
if (((bool)Tools::isSubmit('submitEasyuploadModule')) == true) {
$this->postProcess();
}
$this->context->smarty->assign('module_dir', $this->_path);
$output = $this->context->smarty->fetch($this->local_path.'views/templates/admin/configure.tpl');
return $output;
}
}
The Result was looking like the result.png attachment. What im expect is like the 2nd picture.
What iam missing to embed my template in the Admin Backend? Any Ideas?