Skip to content

Local search · English

    Component properties, repeaters and binding preview

    A reusable component is called a shared section in the builder. Its definition owns the layout and the properties it exposes; each instance chooses its values. A property can use a definition default, a local value, or compatible dynamic data. A repeater property accepts multiple rows and renders the same item layout for each row.

    The control names below match the English builder interface. Dynamic data can come from native CMS entries or mapped external API collections; connect an API under Sources first.

    • Use a sample website with access to edit shared sections and pages. Publishing needs the corresponding publishing capability.
    • Create a shared section, or follow the shared sections guide. Put its reusable subtree inside one root element.
    • For a scalar CMS field, place the instance in that collection’s loop or open its entry template with a preview record. A collection-wide repeater can use a collection directly.

    Open Edit selected section. Select the heading, link or image to customize, then open Attributes → Reusable section fields. Expand Expose text as property, Expose href as property, Expose src as property or Expose alt as property, as appropriate.

    Enter a name such as heading, choose the type, and select Create and connect text property for a text control. This creates the property declaration and connects the selected control in one operation. Names begin with a lowercase letter and contain up to 40 lowercase letters, digits or hyphens. Use unique names for scalar and repeater properties.

    If the control already has a direct CMS binding, explicitly select Replace direct binding (…); keep authored fallback before creating the property. The new property takes over that control; the original text or attribute remains its authored fallback. Configure the instance’s dynamic field in step 3.

    Text exposure requires an element whose children are text only. For a heading containing nested markup, expose a suitable text-only child. Link properties target anchors; image properties target images.

    Select the section’s root element. Under Component properties, edit a property’s Definition default and select Save default heading for heading. Add property creates a declaration; connect a visible control separately, or reference it as dynamic data inside the definition with strukt.section.heading.

    Type Editing behavior
    text Text, including an intentionally empty value.
    number A number input; 0 is a real value.
    boolean True, False, or Use fallback; false is a real value.
    url A URL checked for use in a link.
    media An image URL, image preview and Choose media for the current website.
    date A date picker.
    datetime A calendar shown in UTC. Existing timezone offsets remain until edited; calendar edits are saved in UTC.

    An inline validation message identifies an invalid value. Correct it before publishing. An image that cannot load keeps its saved URL; this differs from a URL rejected as unsafe.

    Save and publish the section definition before publishing a page that depends on it.

    Return to the page, select the shared section instance, and open Attributes → Section instance. Each scalar property has Value source:

    Source What it does
    Default Uses the definition default, or the control’s authored fallback if no explicit default exists.
    Value Stores a value on this instance.
    Dynamic data Resolves a compatible field for the current record; an optional local fallback remains editable.

    Search Dynamic field, then select the intended field, for example products.title. The picker lists compatible types. It does not convert a numeric field to text or choose a random record from a collection. If no field appears, check the property type and record scope. Use default clears this instance’s scalar binding and local value.

    Scalar resolution follows this order:

    1. Valid dynamic field value.
    2. Valid local instance value, including an optional dynamic fallback.
    3. Explicit definition default.
    4. Each connected control’s authored text or attribute.

    Zero, false and an intentionally empty text value do not trigger fallback. Missing, incompatible or unsafe values do, with an explanation in preview.

    In the section definition, select a container with an element child to use as the repeated item. Under Reusable section fields → Repeater property, enter items, declare fields such as title (text) and price (number), then select Create and connect repeater.

    The first eligible child element becomes the item template. Connect its inner controls through the normal dynamic field controls to strukt.item.title, strukt.item.price, and the other declared fields. Reserve a sibling with data-loop-empty for an empty list. The worked API tutorial includes complete example HTML.

    Each item has flat scalar fields. A section supports up to eight repeater properties, each with 1–16 fields and up to 200 authored rows. Do not put a collection loop and a repeater declaration on the same container.

    On the page instance, find Repeater: items and choose its Value source:

    • Default uses the definition’s default rows.
    • Rows lets you add, duplicate, move and delete local rows. Use item fallback clears one cell so its item control can show the authored fallback. Deleting every local row creates an intentionally empty list.
    • Dynamic data lets you search for a collection’s records, a mapped API or public Store list on the current record, or a parent component’s list. Select the source and map every item field to a compatible source field.

    For a whole collection, such as products.$records, Display first N rows defaults to 20 and accepts 1–200. The same display limit applies to scoped lists and forwarded parent lists; new Store list bindings default to 50. Explicit limits stay intact, and preview reports rows hidden by the limit. This is a bounded list, not a paginated collection query. For a nested API array, first expose it under Nested API lists in source mapping; then choose the resulting list while the parent record is in scope.

    Enable Use fallback rows when unavailable if this instance needs local fallback rows, then enter them. Otherwise an unavailable or incompatible list uses definition rows. A valid empty dynamic list stays empty; it does not switch to fallback rows. A missing cell can keep that item’s authored fallback without discarding the entire list.

    Typed row controls in a synthetic component, showing false, date, UTC datetime, media and row actions.

    This synthetic example uses a repeater named items; its field count demonstrates a numeric value of zero. Your field names follow your own definition.

    Select Review mapping suggestions to propose missing mappings whose field names match exactly and whose types are compatible. Inspect the proposed pairs, then select Apply mapping suggestions. Existing manual mappings are preserved. Ambiguous names, missing names and incompatible types stay manual. Changing the input or source fields requires another review. Applying a proposal is one Undo step.

    For product specifications, use text item fields label and value. For a shared plain-text FAQ, use question and answer. Choose the named public Store list in product/variant context and review mapping suggestions before applying them. See the Store list walkthrough.

    Binding preview inspects the actual rendered instance. If the component repeats in a loop, choose Preview record or click the desired component in the canvas. No value is guessed from the first record. If nothing renders, check the selected template record, surrounding loop and filters. The picker offers the first 200 rendered instances.

    Each scalar shows the effective value and its origin: Dynamic data, Instance value, Instance fallback, Definition default or Authored control fallback. Repeaters show their origin, row count, the first three rows and up to five diagnostics. These samples do not limit the rendered list.

    Binding preview and dynamic field mapping for a synthetic API-connected component.

    Source status shows freshness and unavailable data separately. Retry preview data reloads the builder’s preview data after a load failure. It does not run an upstream synchronization; use Refresh now in Sources for that. Searching or choosing a preview record does not save a document change.

    Save the page. Use Preview JS → Run preview to check the saved layout snapshot, then publish the page through its normal review. Section publication and page publication are separate actions. Open the anonymous public URL and verify the values, empty state and images.

    • Two instances can share one layout while using different local or dynamic values.
    • Preview agrees with the selected rendered record, including 0, false and empty text.
    • Manual rows can be reordered and reset with Undo/Redo; an empty list shows the intended empty state.
    • The published page uses the intended live source snapshot and published section dependency.

    When a property or repeater is renamed or removed, select its instance and inspect Remap property … or Remap repeater …. Choose a declared destination. For a repeater, map every stored item field to a unique destination field; this also repairs renamed item fields when the repeater name stays the same.

    Select Review remap … before Apply remap …. A remap preserves the stored binding, literal fallback, row IDs/order, source limit and fallback-row setting. It refuses an occupied destination, incompatible values or known bound-field types, dropped fields and incomplete dynamic mappings. If the input, definition or source field metadata changes during review, review again. One Undo restores the previous input; Redo reapplies it. Use Cancel remap … to leave it untouched. Clear orphaned … remains available when you intend to discard the old input.

    On a narrow screen, use Show Explorer or Show Inspector to open one panel at a time. Hide that panel to return to the canvas. Desktop panel widths and folding preferences remain separate from this compact navigation. Save, Preview JS, Publish and the page navigation remain in the wrapping toolbar.

    Symptom Check
    A dynamic field is absent Property/source type compatibility, collection loop scope and the chosen template record.
    The wrong record appears Select the exact occurrence in Preview record or the canvas, especially inside nested loops.
    A repeater falls back Its list source, all field mappings, source availability and the preview diagnostics.
    No fallback rows appear for zero results A valid empty list deliberately stays empty. Configure the item’s empty-state sibling.
    Publish reports an unknown property A definition may have been renamed or removed. Review the instance’s orphaned inputs and clear or remap them.
    A date/time looks different The datetime editor displays UTC. Compare the instant and original offset before changing it.
    API values remain old Check Live snapshot, refresh outcome and held/schema-change reports in Sources. Preview retry does not refresh upstream data.

    Applies to Strukt 2415503998b814628990059fc312453959af7cb6 · 2026-11-06