DocsFRL reference
On this page

Rule context reference

Look up actor, post, request and payment variables.

Before you begin: Schema reference.

Runtime Variables

VariableAvailable in
$post.current.id / $post.pending.idCurrent generated post id. In a user hook, use $user.id.
$post.current.datasaved post data during get, edit, and delete checks
$post.currentpost metadata for the saved post, such as id, type, author id, and status
$post.pending.datathe data that will be saved during create and edit
$post.pendingpost metadata for the pending write, including the generated id during create
$paymentpayment event handlers
$useraffected user inside user hooks: $user.id, safe $user.current/$user.pending identity and custom data, plus $user.changes during edit
$actioncurrent rule operation metadata, including requested read filters at $action.where, the current payment event at $action.payment, and booleans such as isCreate, isGet, isRead, isList, isEdit, isDelete, isWrite, and isSignIn
$actorrequester data, including $actor.id, $actor.email, $actor.name, $actor.data, $actor.wallet, $actor.isGuest, $actor.isSignedIn, $actor.isAdmin, $actor.isEndpoint, and $actor.endpoint
$admincontent permission helpers for FRL-managed posts
$requestendpoint request data. Helpers that read $request can only be called from endpoint blocks.
$secretsecret values referenced by FRL; fb-admin automatically creates Secret Keys fields for referenced keys
$pageEffective page settings: the selected theme version’s HTML defaults with the admin’s saved edits applied. Available before the first page edit.
$siteInfopublic site information supplied by Frontbacked: $siteInfo.name is the first word of the site name, $siteInfo.fullname is the complete name, and $siteInfo.logoUrl is its logo
$currencyplatform currency config; $currency.value is the selected code and $currency.mode is currently fixed
$thiscurrent post type metadata, including $this.name, $this.fields.status.enums.published, $this.fields.status.default, and $this.fields.status.hasEnum(value)
$contextscratch data for the current rule run; writable in hooks, endpoint bodies, event blocks, and jobs, readable in allow rules and helpers. Deep assignments create missing parent objects. See Build nested scratch data.
$localscratch data inside one helper function call or job run; deep assignments also create missing parent objects. Return a helper value to pass it back to the caller.
Action$post.current$post.pending
createEmpty.New post data and generated metadata.
editSaved post before the edit.Data that will be saved after the edit.
deleteSaved post being deleted.Empty.
getSaved post being fetched.Empty.
listNot available in list permissions because rows are not loaded yet.Empty.

Continue with Secrets and operators reference.