Read page data
Read URL values, site information and settings.
FQL lets your page ask for the data it needs directly from the markup. When expressions reference settings, posts, transactions, wallet balances, aggregates, or lists, Frontbacked loads the missing data and re-renders the page state for you.
Data Roots
| Root | Purpose |
|---|---|
$query | Browser URL query string values. |
$params | Server-provided route params from window.$params. |
$siteInfo | Server-provided site information from window.$siteInfo. |
$auth | The current signed-in user, fetched when needed. |
$currency | The storefront currency context selected by the site owner or visitor. |
$wallet | The signed-in user's wallet balances, including $wallet.default for the platform currency. |
$editMode | Page edit-mode status, including active, canEnable, and whether the browser has accepted the edit-mode warning. |
$settings | Site/theme settings fetched from Frontbacked. |
| bare post type | A single post lookup, such as articles{id:$query.id}. |
$posts or $post | A single post lookup with an explicit post root, such as $posts.articles{id:$query.id}. |
$transactions | Current user's site transaction records and aggregates. |
$list | A list query declared in state. |
$state | Current browser state. |
$ | Current item inside an f-list template. |
Query String
For a URL like /signup?plan=pro&ref=partner, use $query.
Add this configuration inside your page’s {STATE} declaration. Inspect state shows its configuration; live queries and saved data run against your local site. Try a complete FQL page →
Route Params and Site Info
Frontbacked makes route params and public site info available to your page. Route params usually come from backend/paths.json; see Theme Routing for the full routing file format.
Use them in FQL:
Add this configuration inside your page’s {STATE} declaration. Inspect state shows its configuration; live queries and saved data run against your local site. Try a complete FQL page →
$siteInfo can include public contact fields selected by the site admin: email, phone, businessAddress, whatsappContact, telegramContact, and socialProfiles. Social profiles use stable platform keys such as instagram, facebook, x, tiktok, youtube, linkedin, whatsapp, telegram, and pinterest. Frontbacked normalizes handles and returns a generated url when the platform can safely build one. Theme code should show a social profile only when profile.url exists, and can map profile.platform to its preferred icon library.
$siteInfo.name returns the first word of the site name, ideal for compact logos and navigation. $siteInfo.fullname returns the complete site name for headings, footers, and other places with room for it. A one-word site name is returned unchanged by both attributes. Words are separated by whitespace; leading and trailing whitespace is removed, while capitalization and punctuation are preserved.
| Site name | $siteInfo.name | $siteInfo.fullname |
|---|---|---|
Acme | Acme | Acme |
Acme Capital | Acme | Acme Capital |
Acme Capital Group | Acme | Acme Capital Group |
Both attributes are absent when no non-empty site name is configured, so use a fallback where needed.
Settings
Use $settings for site or theme settings.
Add this configuration inside your page’s {STATE} declaration. Inspect state shows its configuration; live queries and saved data run against your local site. Try a complete FQL page →
When a referenced setting path is missing locally, Frontbacked requests it.
Continue with Read a saved record.