Jump to content

Help To Create A Controller


Emkrypted

Recommended Posts

Hi!, I have a problem .. I have a tab my tab redirect the admin or employer to a controller called hola

 

I put that hola controller in modules/mymodulename/controllers/admin

 

ok the code of my controller is this:

 

<?php
class hola extends ModuleAdminController
{
    public function initContent()
    {
        parent::initContent();

        echo $value1 = 'hello world';
    }
}
?>

 

BUT when i click the tab it does not show anything it stays in a blank page, what am i doing wrong? Thanks!

Link to comment
Share on other sites

Try these

 

Change your controller name you use 

 

class hola extends ModuleAdminController

 

change for

 

class AdminmymodulenameholaController extends ModuleAdminController

 

 

I am not sure about the Admin part but I use the module name and the controller word 

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