Add hook for extensions to update current page id, before falling ...

...back to default. Fixes #833