Reference

Block Data

This page lists the data each block stores in o:data (visible through the Omeka S REST API on site_pages), the normalisation applied on save, and the variables passed to each public template. It is intended for developers scripting page content and theme authors overriding templates.

cardSlider

Key Type Notes
heading string
cards_visible int Clamped to 1 to 6
autoplay bool
autoplay_interval int Minimum 1000
cards array Each: title (required, cards with an empty title are dropped), description, image_asset_id (int or null), link_url, link_label. Whitespace is trimmed.

Template card-slider.phtml receives block, heading, cards (each card also gets image_url and image_alt resolved from the asset), autoplay, autoplayInterval, cardsVisible.

itemSlider

Key Type Notes
heading string
selection_mode string curated or query; anything else becomes curated
max_items int Clamped to 1 to 50
query_item_set_id string or int Empty for any item set
query_search string Passed as the search query parameter
query_property_term string With query_property_value, becomes a property filter of type eq
query_property_value string
query_randomize bool Adds sort_by=random
display_properties string[] Property terms; falls back to ['dcterms:title'] if missing
link_to_item bool
link_label string
cards_visible, autoplay, autoplay_interval As for cardSlider

Curated items are standard block attachments (o:attachment with o:item). Query mode calls api->search('items', …) with limit = max_items and site_id set to the page's site.

Template item-slider.phtml receives block, items (ItemRepresentation objects), heading, displayProperties, linkToItem, linkLabel, autoplay, autoplayInterval, cardsVisible, siteSlug.

tabs

Key Type Notes
heading string
tabs array Each: label (required, tabs with an empty label are dropped), content (HTML, stored as submitted)
default_tab int Zero-based index; reset to 0 when out of range

Template tabs.phtml receives block, heading, tabs, defaultTab, blockId.

tabsGroup

Key Type Notes
span int Number of following blocks that belong to the container, counted flatly (blocks inside nested containers count too). Minimum 0.
heading string

The container's render() returns an empty string. Rendering is done by BlockSuite\View\Helper\PageLayout::render(), which walks the page's blocks with a stack of open containers (core blockGroup frames and tabsGroup frames), buffers the HTML of blocks inside a tabsGroup per tab, and renders the frame through the tabs-group.phtml partial when the span is used up (or at the end of the page if the span is too large).

Template tabs-group.phtml receives block, wrapperClass, wrapperStyle (the standard block classes and grid inline styles), heading, intro (HTML of blocks before the first divider), tabs (each: label, default, content HTML), defaultTab, blockId.

tab

Key Type Notes
label string Empty labels are rendered as "Tab N"
default int 1 to open this tab by default; the first divider with default = 1 wins

The divider's render() returns an empty string; it is only a marker consumed by the pageLayout helper.

Writing pages through the API

When creating or updating a site_pages resource, list the container first, then its blocks in order, and set span to the number of blocks that follow it and belong to it. For example, one container with two tabs of one HTML block each:

{
  "o:block": [
    { "o:layout": "tabsGroup", "o:data": { "span": 4, "heading": "About" } },
    { "o:layout": "tab", "o:data": { "label": "History", "default": 1 } },
    { "o:layout": "html", "o:data": { "html": "<p>Founded in 1926.</p>" } },
    { "o:layout": "tab", "o:data": { "label": "Today" } },
    { "o:layout": "html", "o:data": { "html": "<p>Open daily.</p>" } }
  ]
}

The page editor recomputes span from the blocks in the drop zone whenever a block is dragged in or out and again on submit, so hand-set values are corrected the next time the page is saved from the admin.

Log in for Support