wix-router
This module contains the APIs for code routers and data binding router hooks. Learn more.
Additional information about this section
Store values associated with an object
The endpoints exposed by this API
Registers a hook that is called after a router.
Registers a hook that is called after a sitemap is created.
Registers a hook that is called before a router.
Registers a hook that is called after a route is resolved by the data binding router, but before the wix-data query is executed.
Returns a response with a status code 403 (Forbidden) and instructs the router to show a 403 page.
Returns a response that instructs the router to continue.
Returns a response with a status code 404 (Not Found) and instructs the router to show a 404 page.
Returns a response with a status code 200 (OK) and instructs the router to show the selected page.
Returns a response with a status code of 301 (Moved Permanently) or 302 (Found) and instructs the router to redirect to the given URL.
Function containing routing logic for a given URL prefix.
Returns a response with the specified HTTP status code with an optional message.
Function containing sitemap logic for a given URL prefix.
- WixRouterRequest
An object representing an incoming page request received by a router.
- WixRouterResponse
An object representing a response to a request received by a router.
- WixRouterSitemapEntry
An object representing a single entry in a sitemap.
- WixRouterSitemapRequest
An object representing a request for a sitemap.
- WixRouterUser
An object that contains information about the current site visitor who is logged in.