page.changeNum:before $page, $num /site/config/config.php return [ 'hooks' => [ 'page.changeNum:before' => function ($page, $num) { // your code goes here } ] ]