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.

We've moved the forum!

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.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Setting Params in HTTPRequest


Go to End


2072 Views

Avatar
stefant42

Community Member, 14 Posts

3 March 2010 at 7:17am

Hi.

I want to set a param during runtime to get the Value in an other function.

For Example :

$id = $this->request->param('ID');
if(empty($id))
{
  $this->request->setParam('ID',123);
}

But an setParam Method dont exists. My Question is, how can i set Param in the HTTPRequest Object. I want to call $this->request in my Page_Controller.

Best Regards,

Stefan