CTA Shortcode
Usage
The [cta] shortcode places an action-trigger button in any public page. Clicking it
calls
POST /api/actions/:slug/public with the entry ID, using the logged-in user's JWT.
If the user is not logged in, a warning toast is shown instead.
Wrapping form:
[cta action="slug" entry="entry-id" icon="check" confirm="Are you sure?"]Button label[/cta]
Self-closing form:
[cta action="slug" entry="entry-id" label="Button label" /]
| Attribute | Required | Default | Description |
|---|---|---|---|
action |
Yes | — | Action slug |
entry |
Yes | — | Entry UUID to act on |
label |
No | "Run" |
Button text (self-closing only) |
style |
No | "primary" |
primary · secondary · ghost · danger |
icon |
No | — | Domma icon name |
size |
No | — | sm · md · lg |
confirm |
No | — | Confirmation prompt before executing |
Add per-entry buttons to any [collection] shortcode:
[collection slug="applications" display="cards" title-field="name"
cta="approve-application"
cta-label="Approve"
cta-icon="check"
cta-style="primary"
cta-confirm="Approve this application?" /]
| Attribute | Default | Description |
|---|---|---|
cta |
— | Action slug — enables per-entry buttons |
cta-label |
"Run" |
Button label |
cta-icon |
— | Domma icon name |
cta-style |
"primary" |
Button variant |
cta-confirm |
— | Confirmation prompt |
All three display modes support CTA buttons: cards (card footer), list (inline), table (dedicated column).