Publishing, sharing & exports

Publish lenses to public URLs, control who can view them, pin them as app pages, embed them, and export to PDF and other formats.

#Draft → published

A lens starts as a draft. Publishing snapshots the current version and makes the public surfaces live; further edits stay private until you publish again. Version history lets you roll back to any published version.

#Who can view

Set the access mode in the lens Share dialog:

Mode Who gets in
Public Anyone with the URL.
Token Anyone with the tokened URL — regenerate the token to revoke old links.
Password Anyone who enters the shared password.
Authenticated Any signed-in user.
Role Only the roles you pick.

Two layers of security apply on every render: the mode above gates the page, and row-level security gates the data — a public page only shows records the public role can read. If a public catalogue renders empty, grant the public role read access to its collections.

#Where it renders

  • Public page: /l/your-slug.
  • Embed: /embed/your-slug — an iframe-friendly variant; the Share dialog gives you the snippet.
  • App page: pin a backend lens and it appears in the sidebar under Pages.
  • Collection view / record preview: attach the lens to a collection (Collection settings → Views) and it becomes a switchable view on the Data page or the record's preview.

#Exports & reports

Any lens exports to HTML, CSV (its tables), Markdown, or PDF from the Lens list. Report-kind lenses add print settings — page size, orientation, margins — and a .lens-page-break class forces a page break in custom HTML.

  • PDF uses server-side browser rendering when the deployment has it; otherwise you get a print-ready HTML file that prints to PDF from the browser.
  • Per-record reports: from a record's preview, export produces a PDF scoped to that record — pair it with a record-preview lens for one-click record sheets.
  • Exports run as you, so they contain what your role can see.

#Tips

  • Share dialog → view counts show how often a public lens is opened.
  • ?param=value URL parameters flow into bindings and {{$url.param}} — one published lens can serve many filtered variants by link alone.
  • Import/export a lens as JSON to move it between projects (Lens list → ⋯ menu).