cms.sitePicker.overrideQuery

Triggered in Cms\Helpers\Cms\HasSites.

Enables manipulating the URL query parameters

You will have access to the page object, the old and new site and the URL query parameters.

Example usage:

Event::listen('cms.sitePicker.overrideQuery', function($page, $params, $currentSite, $proposedSite) {
   if ($page->baseFileName == 'your-page-filename') {
        return YourModel::translateQuery($params, $currentSite, $proposedSite);
    }
});