if i was previously saying
if ( Director::urlParam("OtherID") ) {
what does this become in SS3?
HTTP_Request::??
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
if i was previously saying
if ( Director::urlParam("OtherID") ) {
what does this become in SS3?
HTTP_Request::??
When I use
$MyRequesParamvar = Director::urlParam("OtherID"); in ss2.* works fine.
In silver stripe 3 I get an error saying Director:urlParam is depreciated.
So I'm not sure how I use the http_request ?
what does the above become in Silverstripe 3?
Sorry, missed that dep note.
Try:
$this->request->getVar('OtherID');
Assuming you're in a controller, it becomes $this->request->param('OtherID'). Otherwise, Controller::curr()->getRequest()->param('OtherID').
many thanks
Both of those worked for me
i used $this->request->param('OtherID');