Developing my own module and haven't had much experience with the module API. When I first started off, I was using GET variables and finding their in value the DoAction function.
I have since changed to RegisterRoute to allow for pretty URLs. That all working fine, except one part; the CMS no longer recognises that I am on the categories page (part of my module) and instead defaults to home.
What do I have to set in order for it to know what page I am on?
Code: Select all
<?php
function SetParameters(){
$this->CreateParameter('catid', $_GET['catid']);
$this->CreateParameter('prodid', $_GET['prodid']);
$this->RegisterRoute('/store.php\/$/', array('action'=>'default'));
$this->RegisterRoute('/store.php\/(?P<catid>[0-9]+)$/', array('action'=>'viewcat'));
$this->RegisterRoute('/store.php\/(?P<catid>[0-9]+)\/(?P<prodid>[0-9]+)$/', array('action'=>'viewprod'));
}
?>
Cheers,
Cobby