Jump to content

More than one admin controller


Recommended Posts

Hello,

 

I am just following the tutorial of creating an admin tab and an admin form for my module.

 

The first controller is done ok, everything correctly.

 

I want to add an other controller but this controller is never founded: "Controller is not found"

 

Should I need a modulerouter or something for the admin controllers?

 

These are my controllers, so easy:


class AdminAdminmessagesAddmessageController extends ModuleAdminController
{
	 public function __construct()
    {
        $this->bootstrap = true;
        $this->table = 'admin_messages';
        $this->className = 'ErnestoMessages';
        $this->lang = false;
        
        $this->context = Context::getContext();

        parent::__construct();
    }
}
class AdminAdminmessagesCheckController extends ModuleAdminController
{
	 public function __construct()
    {
        $this->bootstrap = true;
        $this->table = 'admin_messages';
        $this->className = 'ErnestoMessages';
        $this->lang = false;
        
        $this->context = Context::getContext();

        parent::__construct();
    }
} 

The second one, when i access to it, Controller not found...wawawawawa :angry:  :angry:  :angry:  :angry:  :angry:  :angry:  :angry:  :(  :(  :(

 

 

Regards

Link to comment
Share on other sites

$url =  blablabla->getAdminlink("nameOfTheController");

 

(toolbar href attribute)

href =$url

 

 

I have founded that the only way to make work it is creating a new tab for this controller, but it wasnt my idea to create a tab for this.

 

Anyway, thank you!

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