$restp = "?cat=" . $CAT_REQUEST . "&page=" . $PAGE_REQUEST;$HTML = preg_replace('/{CANONICAL_LINK}/', $_SERVER['PHP_SELF'] . $restp, $HTML);If you use custom parameters in the URL, as I do, and need to include these, you can add something like this between those two lines:

foreach ($_GET as $key => $value) {if (stripos("zoom|goto", $key) !== FALSE) {$restp .= "&" . $key . "=" . $value;}}where zoom|goto is a list of tags that also need to be included. Or, just specify them all with suitable defaults if they are not already defined - it depends what you are up to!

You will also need to adjust your template.html file for whatever layouts you use. Just add