Jump to content

Url routing to custom module method


Hkofoed

Recommended Posts

Hi there.

 

I'm trying to create a custom module with a controller method that needs to be called directly from a url.

 

I have created a module called 'mymodule', then I have created a controller ' /controllers/front/default.php

 

The controller class is set to ' MymoduleDefaultModuleFrontController extends ModuleController '

 

And then within this controller the __construct method is called.

 

Is this the correct way to go about it and how can i call the controller via url?

 

Something like.....  www.aaaa.com/modules/mymodule

 

Any suggestions. I have tried like this: 

http://www.prestashop.com/blog/en/custom-url-routing-prestashop-modules/

 

But I can't get it to execute a custom method within the controller.

 

Regards

Henrik

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