Hi there, i want to pass a variable to my controller and then use that to set a session variable. I have managed to get it to work, but it only seems to work on pages that inherit from the page class and not the page class itself. So if i have a pagetype call MyPage that inherits from Page...this code works...if i try and use it on the home page for example...it fails. Any ideas?
class Page_Controller extends ContentController {
private static $allowed_actions = array (
'MyUrl'
);
public function init() {
parent::init();
}
public function MyUrl() {
$x = $_GET['myurl1'];
if (isset($x)) {Session::set('MySession', $x);}
$y = Session::get('MySession');
return $y;
}
}