Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class AwardWinnersPage_Controller extends RedirectorPage_Controller {
- function init() {
- $page = DataObject::get_one('AwardsPage', '', '', 'year DESC, term DESC');
- $urlId = Director::URLParam('ID');
- $urlAction = Director::URLParam('Action');
- var_dump($urlId); die();
- if($urlId !== null) {
- Director::redirect($page->AbsoluteLink() . '/' . $urlAction . '/' . $urlId);
- } else {
- Director::redirect($page->AbsoluteLink());
- }
- $this->LinkToID = $page->ID;
- parent::init();
- }
- }
Add Comment
Please, Sign In to add comment