Domma CMS User Manual

Data shortcodes

Updated by Darryl Waterhouse on 15 November 2026 7 min read

These shortcodes show things you keep elsewhere in the admin: the entries of a collection, a saved view, a form, a block, a component, a button that runs an Action. Each one has its own section below, with an example to copy and every attribute it takes.

collection - the entries of a collection

Shows the entries of a collection on a page - as a table, cards, a list, an accordion, a timeline, a carousel, a list group, or through a block of your own design.

[collection slug="team" display="cards" columns="3" title-field="name" /]
[collection slug="products" display="list" limit="10" sort="price" order="asc" /]
[collection slug="jobs" where_location="London" where_salary_gte="50000" /]
[collection slug="applications" scope="mine" display="cards" /]

Before it shows anything, the collection has to be allowed on pages: open the collection, go to API & Export, and switch on Show on pages. That is already on for a collection you made to hold content. It is off for a Tool's collection, a built-in one, and one that stores a form's submissions, until you switch it on. A tag for a collection that is off shows nothing (the editor's preview says why).

The attributes every display takes:

Attribute What it does
slug Which collection. Required
display table, cards, list, accordion, timeline, carousel, listgroup or block. Without it: a table, or cards when visitors can search, sort or filter (below)
fields Which fields to show, comma separated. Without it, all of them except fields marked as not shown in lists
limit The most entries to show
sort The field to sort by (default: newest first)
order asc or desc
empty Words to show when there are no entries
where_<field> Show only matching entries - see "Showing only some entries" below
scope mine shows a signed-in visitor only the entries they created
class Your own CSS class on the whole display
item-class Your own CSS class on every entry (not table rows)
id Your own id

The displays

Display Extra attributes
table search, sortable (both on unless set to false), exportable (true adds a CSV button), page-size (rows per page, default 25)
cards title-field (the field used as each card's title), columns (2-4, default 3)
list title-field
accordion title-field, body-field, and multiple="true" to let several stay open
timeline title-field, date-field, status-field, icon-field, body-field, and layout, theme, mode as on [timeline]
carousel image-field, title-field, body-field, and the [carousel] attributes (autoplay, interval, animation, height and the rest)
listgroup title-field, body-field, and variant, size, itemvariant, action as on [listgroup]
block block - the name of the block that draws each entry - and cols for how many across. Carousel and list group take block too
[collection slug="events" display="timeline" title-field="title" date-field="date" body-field="summary" /]
[collection slug="testimonials" display="carousel" image-field="photo" title-field="name" body-field="quote" autoplay="true" /]
[collection slug="team" display="block" block="profile-card" /]

Designing a block for entries is covered in Blocks.

Showing only some entries

Add where_ and a field name to keep only the entries that match. A word after the field name changes the comparison:

Written as Keeps entries where
where_location="London" the field equals the value
where_status_ne="closed" it does not equal the value
where_salary_gt="40000", where_salary_gte="50000" it is greater than / at least the value
where_salary_lt="100000", where_date_lte="2026-06-01" it is less than / at most the value
where_type_in="full-time,contract" it is one of the listed values
where_status_nin="archived,withdrawn" it is none of the listed values
where_title_contains="engineer" it contains the words (capitals ignored)
where_title_starts="Senior", where_email_ends="@example.com" it starts / ends with the words
where_remote_exists="true" the field has a value

Several where_ attributes all have to match. For "this or that", build a View and show it with [view].

Letting visitors search, sort and filter

Add any of these and the display becomes a browser, with a search box, a sort menu, filters and pages:

[collection slug="jobs" display="cards" columns="3"
  searchable
  filterable="location,type,salary"
  sortable
  page-size="9"
  empty="No matching jobs." /]
Attribute What it does
searchable Switch: a search box
sortable Switch: a sort menu over every field, or sortable="title,salary" to offer only those
filterable The fields to offer as filters, comma separated. The control suits the field: a text box, a from-and-to pair for numbers and dates, a pick list for choices
paginate Switch: pages, without the rest
pagination pages (default) or scroll (more entries load as the visitor scrolls)
page-size Entries per page (default 12)
mode client (default; all entries are sent with the page) or server (each page is fetched as needed - for large collections)
exportable Switch: an Export CSV button
no-saved-searches Switch: hide the saved-searches menu
no-url-sync Switch: do not keep the visitor's choices in the page address
transitions Switch: each entry shows buttons for the Actions that can move it to its next state

A where_ filter you write always applies; visitors can narrow within it but never see past it.

Whatever the display, a visitor can also right-click an entry to filter, search, sort, group, copy, export or print what is shown, and copy a link to that exact view.

A visitor's own entries

scope="mine" shows a signed-in visitor only the entries they created - "My applications", "My orders". Visitors who are not signed in are asked to sign in.

[collection slug="applications" scope="mine" display="cards" title-field="jobTitle" /]

A button on every entry

On the table, cards, list and block displays, each entry can carry a button that runs an Action:

Attribute What it does
cta The Action to run for that entry
cta-label The words on the button (default "Run")
cta-icon, cta-style Its icon and colour
cta-confirm A question to ask before running

view - a saved View

Shows a saved View - a query you built under Views that can join, filter and group collections. It takes the same displays as [collection].

[view slug="products" display="table" limit="50" /]
[view slug="team" display="cards" columns="3" title-field="name" /]
[view slug="employer-applications" display="table" searchable sortable page-size="20" /]
Attribute What it does
slug Which View. Required
display table, cards, list, accordion, timeline, carousel, listgroup or block. Without it, the display saved on the View
limit The most entries to show (default 25)
fields Which fields to show, comma separated
title-field The field used as each card's or row's title
columns For cards: 2-4 (default 3)
empty Words to show when there are no entries
block The block that draws each entry
action An Action to run from a button on every entry, styled with cta-label, cta-style, cta-icon, cta-confirm
class, item-class Your own CSS class on the display / on every entry

The attributes for each display are the same as on [collection]. searchable, sortable, filterable and paginate work too, and switch the display to cards unless you or the View say otherwise.

Views are explained in Views.

block - one of your blocks

Puts one of your blocks on a page, filling its placeholders with the values you write.

[block template="contact-card" full_name="Jane Doe" phone_number="555-1234" /]

Every block can also be written with its own name as the tag. These two are the same:

[block template="contact-card" full_name="Jane Doe" /]
[contact-card full_name="Jane Doe" /]
Attribute What it does
template The block's name. Required in the [block …] form
anything else A value for the placeholder of that name: full_name="Jane Doe" fills {{full_name}}
class, id Your own CSS class or id on the block's wrapper

A block that has slots can hold content of its own. Write it as a pair, with the content between the tags, and [slot name="…"] for a named slot:

[domma-block-cushion-card heading="Your heading"]
**Body content**, with any shortcodes you like.
[slot name="footer"]
[button href="/contact"]Contact us[/button]
[/slot]
[/domma-block-cushion-card]

Good to know:

  • A block named the same as a built-in shortcode (card, menu) can only be used through [block template="…"].
  • A placeholder you give no value for is left empty. A block that does not exist shows nothing.
  • In the editor, right-click and choose Add block… to insert a block with all its parameters written out. Right-click inside a block's tag to fill them in, or Edit the block to open it in its own tab.
  • Blocks are made under Blocks in the sidebar - see Blocks.

component - one of your components

Puts one of your components on a page. Components are small interactive pieces made under Components in the sidebar.

[component name="counter" initial="5" /]
Attribute What it does
name The component's name. Required
anything else Passed to the component as a setting

A component can be written inside any container. A tag for a component that does not exist shows nothing. See Components Reference.

form - one of your forms

Puts one of your forms on a page.

[form name="contact" /]
[form name="newsletter" class="mt-4" /]
Attribute What it does
name (or slug) Which form. Required
class, id Your own CSS class or id on this placement

Forms are built under Forms in the sidebar - see Collections & Forms.

cta - a button that runs an Action

A button that runs an Action - send an email, change an entry, call a webhook - rather than opening a page.

[cta action="send-welcome" entry="abc123" style="primary" icon="mail"]Send welcome email[/cta]
[cta action="archive" entry="abc123" confirm="Archive this record?" label="Archive" /]
Attribute What it does
action Which Action to run. Required
entry The entry to run it on
label The words on the button, for the self-closing form
style The button's colour, as on [button]
icon An icon before the words
size sm or lg
confirm A question to ask before running

There is more in CTA Shortcode and Actions.

dconfig - page behaviour without a script

Makes parts of a page react to clicks without writing a script - show a panel when a button is pressed, for example. Between the tags goes a description of what should happen, written as JSON.

[dconfig]
{
  "#my-button": {
    "events": {
      "click": { "target": "#my-panel", "toggleClass": "hidden" }
    }
  }
}
[/dconfig]

This makes a click on the element with the id my-button show or hide the element with the id my-panel.

Good to know:

  • It takes no attributes, and draws nothing on the page.
  • A page can have several; they are combined.
  • JSON with a mistake in it is ignored. The page editor's DConfig tab points out misspelt names and wrong values before you save.
  • The same settings can be kept in the page editor's DConfig tab instead of in the text. The full guide is in DConfig.