22847 Posts in 9589 Topics by 2802 members
General questions about getting started with SilverStripe that don't fit in any of the categories above.
|Go to End|
26 September 2011 at 9:48am
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?
26 September 2011 at 12:29pm
Director::urlParam() is deprecated and doesn't work properly any more - instead you should use $this->request->param() inside your controller.
26 September 2011 at 12:50pm
Hi ajshort - thanks for that. now works perfectly...
22 September 2012 at 12:34am Last edited: 22 September 2012 12:35am
Perfect, this solved the issue for me.
$id = $this->request->param('ID');
$id = Director::URLParam('ID');
11 February 2013 at 6:46pm
In case, I want to get ID param not inside of a controller. How can I do it without Director::urlParam('ID')?
11 February 2013 at 6:48pm
|Go to Top|