Client CraftClient Craft HubStart free

Show data from a data source in a block

On this page
Updated 24 Nov 20263 min read

Connect a text to a field from a data source, or repeat a design for every record with a Collection, including what visitors see when there is no data.

Plan: Free Visual Builder package. The Client Craft offers source works on all plans

Data sources bring values your developer provides, such as service names, opening hours or price options, into the page. You choose the source and field; the site fills in the current value when the page is shown, in the page's language. There is no code to write in the editor.

Before you start #

  • Your developer has registered at least one data source. Without one, the editor says "No public data sources are registered for this website installation. You can keep using static text." See Add a public data source to the Visual Builder.
  • The page's grid allows the Visual Builder Text and Collection blocks. An administrator adds them once in Settings › Data types: open the Block Grid, Add block and pick Collection and Text (they come with the package ClientCraft.VisualBuilder.Umbraco). Allow them at the root and in the areas where editors may use them.

Connect one text #

  1. 1
    Select the text blockSelect a Text block on the canvas and find its Text source field.
  2. 2
    Choose Connect dataSwitch from Static text to Connect data.
  3. 3
    Pick the source and fieldChoose the Data source, then the Field. The editor confirms the link, for example "Connected to Agency public service (example) → Service name".
  4. 4
    Save and previewSave the page. The text now shows the field's current value.

Repeat a design for every record #

  1. 1
    Add a CollectionInsert a Collection block and choose its Collection source. Only sources that return a list of records are offered.
  2. 2
    Design one itemBuild the card once inside the Collection's Item template area. Connect the texts inside it to fields of the same source: they show the value of each record in turn ("current collection item").
  3. 3
    Design the empty and unavailable statesAdd blocks to When no items are available and When the source is unavailable, such as a short message and a link. Only the matching state is shown to visitors; leave an area empty to show nothing.
  4. 4
    Let visitors filter (optional)Under Visitor filters, select Add filter, choose a text field and a label (up to 120 characters). With no filters, all records are shown.

Statuses you may see #

StatusMeaningWhat to do
Value shownThe source answeredNothing
EmptyThe source has no value or no recordsDesign the empty state
UnavailableThe source didn't answer in time, failed, or doesn't serve this page (for example in preview)Design the unavailable state; check the live page
Not configuredThe connection points to a source or field that no longer existsChoose the source and field again, or switch back to Static text. Your text is kept
NoteA source must answer within two seconds for each page view. A slow or failing source shows as Unavailable; it never breaks the page.

What happens next #

Developers: Add a pricing table backed by a data source.

Was this article helpful?