Jump to content

Create admin page using module


rexu

Recommended Posts

I am creating module to create page in admin level.

Used controller as folows in /mymodule/controllers/admin/AdminPendingorderController.php

 

class AdminPendingorderController extends ModuleAdminController {

public $asso_type = 'shop';
public function __construct() {
$this->module = 'pendingorder';
$this->lang = true;
$this->context = Context::getContext();
$this->bootstrap = true;

parent::__construct();
}

public function initContent()
{
$this->renderView();
}


public function renderView()
{
ppp($this->getTemplatePath());

$this->base_tpl_view = 'content.tpl';

return parent::renderView();
}

 

content.tpl file is also located correctly(\prestashop\modules\pendingorder\views\templates\admin\pendingorder\helpers\view).

Created menu 'Test' from administration->menues

but when i tab on 'Test' the blank page displays with no error as follows

Untitled.png

Please correct steps and codes.

Is this correct way to create a content page in admin tab or any other ways?

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