DocsFQL syntax reference
On this page

Data roots and records reference

Look up data roots and single record values.

Before you begin: State syntax reference.

Data Roots

RootExample
$state$state.form.email
$query$query.plan
$params$params.slug
$siteInfo$siteInfo.name
$auth$auth.email
$currency$currency.value
$wallet$wallet.default
$editMode$editMode.active
$settings$settings.site.name
bare post typeproducts{id:$query.id}
$posts or $post$posts.products{id:$query.id}
$transactions$transactions.{status:'successful'}.$counts
$$.title inside an f-list template

$siteInfo can include public contact fields selected by the site admin: email, phone, businessAddress, whatsappContact, telegramContact, and socialProfiles. Each social profile uses a stable platform key and includes a generated url only when Frontbacked can safely build one, so themes should render a social link only when $.url exists.

Site Names

Use $siteInfo.name for the first word of the site name and $siteInfo.fullname for its complete name. For Acme Capital, they return Acme and Acme Capital respectively. For a one-word name such as Acme, both return Acme.

Leading and trailing whitespace is removed. Any whitespace between words separates the first word; fullname keeps the complete name, including spacing between words. Both attributes are absent when no non-empty name is configured.

index.html

Single Post Lookup

FQL state configuration

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 →

The object inside braces is the lookup condition. A single post lookup can start with the bare post type, such as products{...}, or with $posts/$post, such as $posts.products{...}.

Single post lookups resolve to visible post data:

js

Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →

id, type, createdOn, and updatedOn are generated by Frontbacked for posts submitted with Frontbacked.createPost() and preserved for posts changed with Frontbacked.updatePost(). Do not submit these fields yourself; read them from single post lookups and list items.

Theme-owned lookup fields are under data; system fields remain at the object root:

FQL state configuration

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 →

Continue with Account and wallet reference.