How to add query string to JControllerForm auto redirects

From Joomla! Documentation

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Here is the example of how you can adding query string to JControllerForm/Admin auto redirects that caused by sub-controllers of joomla 1.6+.

In this example my query string that I want to add is "example=test"

protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') {
	$append = parent::getRedirectToItemAppend($recordId,$urlVar);
	return $append.'&example=test';
}

Contributors[edit]