> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: About Dynamic Page Hooks ## Article: About Dynamic Page Hooks ## Article Link: https://dev.wix.com/docs/develop-websites-sdk/code-your-site/work-with-data/datasets-and-dynamic-pages/about-dynamic-page-hooks.md ## Article Content: # About Dynamic Page Hooks Dynamic page hooks, also known as data binding router hooks, run custom code at specific points during the page routing and loading process. Unlike regular data hooks that run during data operations, dynamic page hooks let you intercept the routing process when a visitor requests a dynamic page. You can use these hooks to validate requests, modify data queries, or customize the page response. ## Hook types Dynamic page hooks run in a specific sequence during the routing process. You can implement any or all of these hooks depending on your needs. The hooks run in the following order: - **beforeRouter**: Runs before the router processes the request. Use this to validate requests, check permissions, or redirect visitors based on authentication or other criteria. - **customizeQuery**: Runs before the page's data query executes. Use this to modify the query that determines what data binds to the page's dataset, such as filtering results or adding additional query conditions. - **afterRouter**: Runs after retrieving data but before the page displays. Use this to modify the router's response based on the retrieved data, such as choosing different page layouts or redirecting based on data properties. If you also have regular data hooks defined, they run between `customizeQuery` and `afterRouter` in the sequence. ## Hook conventions Dynamic page hooks follow specific naming and file conventions. Define hooks in the `routers.js` file in the site's backend folder and use the router prefix in their function names. For detailed information about hook conventions, parameters, and implementation, see the [Router hooks reference](https://dev.wix.com/docs/velo/events-service-plugins/routers/service-plugins/wix-router/introduction.md). ## See also - [About data hooks](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/work-with-data/data-api/about-data-hooks.md) - [Create dynamic page hooks](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/work-with-data/datasets-and-dynamic-pages/create-dynamic-page-hooks.md) - [Router hooks reference](https://dev.wix.com/docs/velo/events-service-plugins/routers/service-plugins/wix-router/introduction.md) - [About dynamic pages](https://support.wix.com/en/article/cms-about-dynamic-pages)