Skip to Content
Blackbell for builders
Guides

Pages

Load when editing a Blackbell page, translating it, importing HTML, changing site CSS or taking an edit session live.

Link to /page/<id> for a permanent address. Slugs can change. Use set_page_settings for status (draft, published/online, archived), slug, languages, search texts, share image or homepage. A draft is closed to visitors.

Use list_block_templates and add_block for editor-library texts, images, buttons and lists. For a designed free page, write HTML, CSS and JS in one block. The editor exposes each text (power-text), image (power-image) and link (power-link). Read the page-design topic with get_guide for layout and buttons.

Edit and preview

  1. For a named change such as “remove the closed notice”, call find_and_edit with find, then with changes. No page id needed. Otherwise read get_page_outline (about 2 KB), locate lines with search_code and send every change in one edit_page call. Skip a dry run. Keep reads small. Reimporting a whole page for a small change loses saved texts, links and images.
  2. Work in the hidden copy. Use start_edit_session, or let edit_page or find_and_edit open it. Edits start background checks. Read check_edit_session for problems, warnings, quality score, fixes and 390 px and 1440 px screenshots. Broken links block go live. Keep links returning 401, 403 or 429 with link_refuses_bots warnings. Info pages (privacy, legal notice, terms, accessibility, cookies) have page_kind: "info" and skip booking and phone checks.
  3. Use undo_edit_step for one step, undo_edit_session to restore the page as it was before go live, or list_page_versions then restore_page_version for older work. Batch repeated operations across pages in one run_many when available.
  4. Check list_menu before add_to_menu. Menu changes and pin_block (one shared block at the top and one at the bottom of every page) go live immediately. Preview and ask first.

Create or translate

  • Create a draft from authored HTML with create_page. For a file or a large page, call get_upload_link, run curl -sS -T page.html '<upload_url>', then pass upload_id to import_page. Use one link per file, valid for one hour. Send a revised copy of the same file to its link. Review similar_pages and ask before keeping two pages with the same title. Reserve import_free_page for a major redesign that replaces every language’s code. create-page
  • Read available_locales from get_settings. Create one page in the main language. Use add_page_language for each other language with the same texts in the same order. For normal blocks, read get_page_texts then use one edit_page with locale. Visitors switch languages on the same page. Keep language names out of titles and language prefixes out of /page/<id> links.

Style free pages and blocks

  • Show the returned page titles, preview links and laptop/phone screenshots of live pages with the draft applied. By default the previews use the three most recently changed published free pages, or all if fewer. Missing title translations show as Page <id>. Use preview_site_css to reread rendering status and the 390 px and 1440 px images (10–40 seconds). Use the preview URL when rendering is unavailable. Call go_live_site_css on “good”, or discard_site_css_draft to drop the draft.
  • Write whole-document CSS using :root, html and body. In the shadow root the first two become :host and the last becomes .bb-body. get_site_css returns your original rules.
  • For normal blocks, use set_page_style for one design across blocks, set_page_css for page CSS and set_block_class for a block class. For visibility use page-access-and-versions.

On this page