Jump to content

add custom controller from admin backoffice module?


prestashop_newuser

Recommended Posts

Hi,
I am doing a module in prestashop. In that module I have a quick link menu which I have made hooked to admin back office quick link section. For that I have my code inside module is like this
  public function install() {
    if (!parent::install() || !$this->registerHook('leftColumn') || !$this->registerHook('rightColumn')  || $this->registerHook('displayAdminHomeQuickLinks'))
      return false;
      return true;
  }
Now to add link in the hook section I have my code like this
 
 public function hookDisplayAdminHomeQuickLinks($params) {
    return $this->display(__FILE__, 'views/templates/hook/mymodule-quicklinks.tpl');
  }
  
  and in mymodule-quicklinks.tpl I have the link like this
<li id="mymodule-quicklinks">
  <a href="index.php?controller=MyModuleController">
  <h4>My Module Manager</h4>
</a>
</li>
Now you can see that in the link section I have used
 <a href="index.php?controller=MyModuleController">
. So basically I want that when someone clicks on the quicklink then he should redirect to another section(page) of module in backoffice with the module's controller name(in my case I have used controller=MyModuleController ). In that page I will have my form and all the configuration settings for the module. So can someone kindly tell me how to make that controller work? Any help and suggestions will be really appreciable. Thanks.

 

Link to comment
Share on other sites

  • 1 year later...

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