Search.../

wix-router

This module contains the APIs for code routers and data binding router hooks. Learn more.

Guides

Additional information about this section

Properties

Store values associated with an object

Functions

Perform actions on an object

  • afterRouter( )

    Registers a hook that is called after a router.

  • afterSitemap( )

    Registers a hook that is called after a sitemap is created.

  • beforeRouter( )

    Registers a hook that is called before a router.

  • customizeQuery( )

    Registers a hook that is called after a route is resolved by the data binding router, but before the wix-data query is executed.

  • forbidden( )

    Returns a response with a status code 403 (Forbidden) and instructs the router to show a 403 page.

  • next( )

    Returns a response that instructs the router to continue.

  • notFound( )

    Returns a response with a status code 404 (Not Found) and instructs the router to show a 404 page.

  • ok( )

    Returns a response with a status code 200 (OK) and instructs the router to show the selected page.

  • redirect( )

    Returns a response with a status code of 301 (Moved Permanently) or 302 (Found) and instructs the router to redirect to the given URL.

  • router( )

    Function containing routing logic for a given URL prefix.

  • sendStatus( )

    Returns a response with the specified HTTP status code with an optional message.

  • sitemap( )

    Function containing sitemap logic for a given URL prefix.

Subcategories