Jump to content

Adding a new page with custom code


Recommended Posts

Hello,

I need to add a page in my site but this page will have some content that I will have to generate myself. 

So I will have to develop a module.

But I need to have a specific URL for this page, it can't be something like mydomain/modules/modulename...

How can I do that ?

Thanks for your help.

Link to comment
Share on other sites

You mean, in "Route to modules" section ?

But as I can see, the only thing I could do would be to set a specific URL pattern, like for example:

{/:controller}

And the URL would be http://www.mydomain/my_module_controller_name

But it will be the same thing for the other modules. 

What I wanted is to be able to giev a specific URL for this specific module, you see ?

 

Link to comment
Share on other sites

I made a try, with a sample example found on prsetashop documentation (how to create a simple module). 

So I hae this page:

http://localhost/prestashop/module/mymodule/display

For now it displays some static text that I wrote, but later it will retrieve data from the database and display it. 

Anyway.

My point here is that the URL is not at all what I want, as I'd like to have something like:

http://localhost/prestashop/my_own_custom_url

And I can't see anywhere in SEO & URL options where I can achieve that...

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