DocsFirst pages · FQL
On this page

Reuse page components

Share HTML and state across your theme pages.

Before you begin: Navigate between pages.

Component Imports

Use f-insert and f-replace for shared page parts:

index.html

The imported HTML is loaded from the same theme before the page is served. Nested imports are resolved by Frontbacked, and FQL bindings inside imported fragments work as if the HTML was written directly on the page.

Imported files can be fragments or complete HTML pages. When the imported file is a complete page with <head> and <body>, Frontbacked inserts only the content inside that imported page's <body>. The imported page's <head> is not inserted into the page, except for its FQL {STATE} declaration.

If imported files contain {STATE} comments in their <head>, Frontbacked merges those declarations into one {STATE} comment in the main page head before the page is sent to the browser. Imported state is placed first, then the main page state, so the main page can override a duplicate state key.

index.html
index.html

If an import cannot be resolved, is blocked, is too large, too deep, or creates a circular import, Frontbacked replaces that import placeholder with a visible frontbacked-import-error block so the issue is obvious during theme development.

Provider buttons behave the same way for unsupported values: f-auth-provider elements stay hidden when a known provider is disabled, but Frontbacked renders a visible FQL-style error when the site does not return the requested provider id. Google and GitHub are available to themes when they are configured and enabled.

Continue with Connect a page to protected data.