Jump to content

How to add a display(view) to custom controller on module


jahyax

Recommended Posts

I am trying to create a module with custom Tab(menu) and a have custom controller, and on that menu I want to display some info from a tpl file

 

i have like.. 

*during the installation of the module, It inserts data into the database which then create a new tab..
please see the attached image..'new-menu-ps1609.jpg'

 

post-530272-0-02022300-1411483576_thumb.jpg

 

but, i dont know how to put a display on that menu..

 

i also created a contoller on the /modules/mymodule/MyModule.php
 

and on that file ihave the following contents..

 

class MyModule extends AdminController

{

    

    protected $html = '';

    public function __construct()

    {

       $this->bootstrap = true;

       $this->table = 'product';

       $this->className = 'Product';

 

       parent::__construct();

 

        $this->viewDisplay();

     }

 

    public function viewDisplay()

    {

       return $html .= "<div><p>Custom Product List</p></div>";

    }

}

 

***but i am getting a blank display like 'new-menu-blank.jpg'

 

post-530272-0-57814800-1411484469_thumb.jpg

 

 

can anyone help me on the work around for this?

 

Link to comment
Share on other sites

×
×
  • Create New...