DocsTheme structure & publishing
On this page

Page Setting Defaults

Give new sites useful content immediately by declaring defaults in your theme HTML. Frontbacked makes those values available when the site is created, so both FQL and FRL can use them before an admin edits a page.

index.html

FQL reads these values through $settings.home.title and $settings.investment.packages. FRL reads the same saved data through $page:

backend/index.frl
Rule input (JSON)

Use a complete version 2 rule file. Select a post with “postType” and “action”, or an “endpoint” by name. Saved data, jobs, payments and email need the local server. Dedupe replay protection also needs a site.

Check complete rules or run schemas, permissions, hooks and calculations against the input above. Add excerpts to a complete rule before running.

Lists and Shared Components

The first child of a settings list defines its item template. Additional authored children supply the remaining default items. Nested object lists and text lists are supported, including settings lists declared through a {STATE} selector. The usual list limits apply.

Give shared settings consistent defaults across pages. Reusing a component keeps the names, IDs, text, images, and list structure together. Keep published package IDs stable when editing names or reordering items.

Theme Versions

Each theme version carries its own defaults. Untouched settings follow the version the site is using. Switching from version A to version B uses B's defaults; switching back restores A's defaults. Automatic updates and theme previews follow the same rule.

Admin edits take priority. Saving a value keeps it even when it matches the current default. Empty text, empty lists, false, 0, and null are intentional values. New fields receive their defaults automatically. FQL $settings and FRL $page use the same values.

Use Reset or Reset to default for a field, or Restore defaults for a list, then save the draft and save changes. This removes the override so future theme defaults can apply. Typing the default value manually saves a custom value instead.

Edited lists remain complete custom lists. Updates do not merge new default items into them or replace individual fields. Reset the whole list to follow the theme again. Resetting an individual item or nested field keeps the enclosing list custom.

In local development, changes to authored HTML defaults appear in untouched settings on the next request. Saved edits stay in place across changes and server restarts.

Typed defaults

Use f-type-text or f-type-attr-NAME to give an editable binding a type and optional limits. Numeric and boolean defaults are saved with those types. Inside a settings list, the first item template supplies the rules for every authored item. Untyped text stays text and can be edited up to its default length; empty untyped defaults stay uneditable. Explicit types default to required, with required: false available for optional fields. See Page editor field types.

Money declarations keep authored decimal amounts exact and apply the site base currency when defaults are loaded. These site-specific defaults are independent of other sites using the same theme. Admin-saved money values keep their recorded currency, including when the site currency changes. Reset restores the current authored amount in the site base currency.