Method Frontend::addToUrl

Inheritance:

Meta:

Written by

Leo Feyer <http://www.contao.org>

/system/modules/frontend/Frontend.php line 144
Automatically extracted PHP DOC comment from code:

Overwrite parent method as front end URLs are handled differently

END OF PHP DOC
protected function string addToUrl(string $strRequest, boolean $blnIgnoreParams)

Parameters

string $strRequest

$strRequest contains the parameters you would like to add to the current url. This can be useful if you want to use steps or something similar.

The format is an ampersand sepreated string of "name=value" pairs.

Instead of reading the current url and redirecting you can use System::redirect() like the following:

$this->redirect($this->addToUrl('step=' . $step));
boolean $blnIgnoreParams
Default: false

The parameter $blnIgnoreParams is set to false by default. If you set it to true the current $_GET parameters are not going to be added to the url.

Add a comment

Please add 7 and 2.