[SOLVED] A simple pretty url question
Posted: Tue Jul 31, 2007 12:21 pm
I am currently building a module, and am trying to get some pretty urls using registerroutes working how i want them. At the moment, if I define a route in Shop.module.php like so:
it calls the default action inside my shop module (which is how it should happen - no problems so far)
but, the content that my default action spits out gets put into the refering static page (either that or the home page if i type the address in directly)
i tried overriding it by putting page=>shop in the default params aray in my regiterRoute function like so:
But that didn't work.
I assume there is something I am missing here. Please Help! Thanks guys
Code: Select all
$this->RegisterRoute('/[sS]hop\/product\/(?P<productalias>[A-Za-z0-9-]+)$/',array('action'=>'default'));
but, the content that my default action spits out gets put into the refering static page (either that or the home page if i type the address in directly)
i tried overriding it by putting page=>shop in the default params aray in my regiterRoute function like so:
Code: Select all
$this->RegisterRoute('/[sS]hop\/product\/(?P<productalias>[A-Za-z0-9-]+)$/',array('action'=>'default','page'=>'shop'));
I assume there is something I am missing here. Please Help! Thanks guys
