Jump to content

Create custom url with parameters


Recommended Posts

Hello. I'm starting with module development and I would like to make a module that register a new path (url + parameters) and when a user navigate to this url you'll see a page that print the parameters. That is, create a custom route and a controller that responds to this route with parameters. I think it's very simple, but I haven't found some instrucctions about how to do it.

Link to comment
Share on other sites

you can pass the perimeters like this

$this->context->link->getModuleLink('module_name','controller_name',array('id'=>$data->id));

and if you want to pass the variables to any template (tpl) then you can use the

$this->context->smarty->assign('id', $id);

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