Skip to main content
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
my url is mysite.com/category/subpage/shownote/1
Director::URLParam('Action') is giving me the value 'subpage' and
Director::URLParam('ID') is giving me the value 'shownote'
I'm expecting action to equal shownote, and ID to equal 1.
what am I doing wrong here?
Director::urlParam() is deprecated and doesn't work properly any more - instead you should use $this->request->param() inside your controller.
Hi ajshort - thanks for that. now works perfectly...
Perfect, this solved the issue for me.
$id = $this->request->param('ID');
$id = Director::URLParam('ID');
In case, I want to get ID param not inside of a controller. How can I do it without Director::urlParam('ID')?