Jump to content

How to embed Admin Module Controller in Backend

Recommended Posts


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:


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->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?



Share this post

Link to post
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...

Important Information

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