Routes and parameters
A route is the part of the address that identifies a page inside your app, such as /customers. Routes can contain route parameters (/customers/:id) that carry a value into the page, and any page can accept query parameters (?tab=invoices) for optional values. Because every page h
A route is the part of the address that identifies a page inside your app, such as /customers. Routes can contain route parameters (/customers/:id) that carry a value into the page, and any page can accept query parameters (?tab=invoices) for optional values. Because every page has a real address, links can be shared, bookmarked, refreshed and opened in a new tab, and the app knows which page and record to show.
When to use
Set a route when you create a page (or accept the default made from the name). Add a route parameter when the page shows one record. Use query parameters for optional state you want in the address, such as a filter or a preselected tab.
Routes
- Routes start with
/and use lowercase letters, numbers and hyphens: the new page dialog proposes/customer-listfor Customer list. You can type your own. - Routes must be unique; the home page is always
/. - Change a route in Page settings → General → Route. The editor normalises what you type.
- These paths are reserved for the built-in sign-in screens:
/login,/signup,/forgot-password,/reset-password,/verify-email,/magic,/account.
The address of a published page is your app's address plus the route, for example https://sparkle.myappbuilder.app/customers or https://…/a/sparkle/customers (the path URL that works without custom DNS).
Route parameters
Write a parameter as :name in the route. /:id is the usual choice; a route may hold several, e.g. /projects/:projectId/tasks/:taskId.
- The parameter's value is available in the data picker under Page parameters and in templates as
{{params.id}}. - The Data tab's shortcut Record from page URL (:id) adds the filter id is Page parameter › id and limits the query to one record.
- Navigations to the page must provide every parameter; the Storyboard and the publish checklist warn when one is missing. See Dynamic routes.
- In the Storyboard page inspector, Route parameters lets you add or remove a key; adding one appends
/:keyto the route.
When the app resolves an address, pages with fixed routes win over parameterised ones, so /customers/new (a standard page) takes precedence over /customers/:id.
Query parameters
Query parameters are optional ?key=value pairs after the route. Declare the keys a page understands in Page settings → General → Query parameters (or in the Storyboard page inspector) so they show up in the data picker under Query parameters; templates can read them as {{query.key}}.
Pass them with the Go to page action (the Query parameters list in the edge inspector or the Connect pages dialog). Empty values are left out of the address. See Query parameters.
Deep links and refresh
- A visitor can open any page address directly. If the page requires sign-in and they are not signed in, the live app sends them to
/login?next=…and brings them back to the same address after signing in. - Refreshing the browser reloads the same page with the same parameters; the back button returns to the previous page.
- Modal and drawer pages do not change the address; a refresh returns to the page underneath.
- In the builder preview, the trail under the toolbar shows the pages you visited; click one to jump back.
Examples
/customers → Customers list (standard)
/customers/:id → Customer detail; {{params.id}} = "rec_8f2…"
/customers?status=new → Customers list filtered with {{query.status}}
/book → Public booking pageCommon mistakes
- Typing a parameter without the colon (
/customers/id): it becomes a fixed path. Use:id. - Changing a route after sharing links: old links show Page not found. Keep routes stable once published, or set up a redirecting page with an on-load Go to page action.
- Reading a query parameter that was never declared: declare the key on the page so the picker and the Storyboard know about it.