dynamic location url for a single page
Permalink
I have a page that shows different products based on parameters passed.
Rather than create multiple copies of the page. Is it possible to have just one that is accessible via many urls. So we could have for example
/home/a/b/index.php?somevars
and
/home/a/index.php?someothervars
and they would really all point at the same page?
(we have a few hundred products all with different urls but can be parametrized to show different content)
Any help much appreciated
Rather than create multiple copies of the page. Is it possible to have just one that is accessible via many urls. So we could have for example
/home/a/b/index.php?somevars
and
/home/a/index.php?someothervars
and they would really all point at the same page?
(we have a few hundred products all with different urls but can be parametrized to show different content)
Any help much appreciated
you need to create a controller for the single page and then add the view method to the controller class.
Here is an example view method:
Let's say your single page is located at: mysite.com/index.php/singlepage
By putting 1 parameter in the view method of the controller, you can give 1 parameter to the singlepage. In the example if a person would go to: mysite.com/index.php/singlepage/myparameter
then the $parameter variable in the view method will be 'myparameter'.