Developers
Start building
Themes/Theme SDK/Modules/routing/Functions

Functions

The functions of @poltura/theme-sdk/routing.

On this page
import { … } from '@poltura/theme-sdk/routing';

redirect

Stops rendering the page and sends the visitor to another one.

redirect(href: string): never

Parameters

  • href: string: Where to send the visitor.

Returns: Never; it throws to the router.

notFound

Stops rendering the page and shows the store's not-found page.

notFound(): never

Returns: Never; it throws to the router.

pageHref

The URL of a site page.

pageHref(page: SitePageRef): string

Parameters

  • page: SitePageRef: The page to link to.

Returns: The page's root-relative URL.

Last updated