Skip to content

uc-apx create region cards

Insert a new cards region. Source can be a local-database table (—table, synthesised as select * from TABLE) or an inline SQL query (—sql). Exactly one of —table or —sql is required.

Required: —pk-column (primary key) and —title-column (card heading). Optional slots: —subtitle-column, —body-column / —body-html, —icon-class (static fa-*) and/or —badge-column.

Optional media: —media-source urlColumn|blobColumn + —media-column. —media-source blobColumn additionally requires —media-mime-column.

—action-page N emits a fullCard redirect action targeting page N.

Deferred to Phase 3: REST source, secondaryBody, icon variants other than iconClass, multiple buttons, componentAppearance.gridColumns, paginated cards, theme templateOptions arrays.

uc-apx create region cards [flags]
FlagTypeDefaultDescription
--action-item-pairstringsNAME=VALUE pair emitted inside the action’s target.items (repeatable). Replaces the default P<action-page>_<pk-column>: &<pk-column>. when set.
--action-pageintEmit a fullCard redirect action targeting this page number
--badge-columnstringColumn rendered as the card badge
--body-columnstringColumn rendered as the card body (mutually exclusive with —body-html)
--body-htmlstringHTML expression for the card body, supports &COL. substitutions (mutually exclusive with —body-column)
--column-spanint12-col grid span for the region’s layout (0 = omit; e.g. 6 for a half-width region)
--dry-runPrint rendered region to stdout without writing
--forceReplace an existing same-id region on the page (deletes the old one first; inherits layout.sequence and slot unless overridden)
--icon-classstringStatic Font Awesome icon class (e.g. fa-calendar-user); emits iconAndBadge with iconSource: iconClass
--idstringRegion id (default: kebab-case of —name)
--media-columnstringColumn holding the image URL or BLOB (required when —media-source is set)
--media-mime-columnstringColumn holding the MIME type (required when —media-source blobColumn)
--media-positionstringMedia placement: first, body, or background (optional)
--media-sourcestringMedia source: urlColumn or blobColumn (triggers the -media template variant)
--namestringDisplay name of the region [required]
--pagestringTarget page (numeric ID, alias, or name) [required]
--pk-columnstringPrimary key column [required]
--sequenceintLayout sequence (default: max existing + 10)
--slotstringbodyPage slot to place the region in
--sqlstringInline SQL query (or @path/to/file.sql to read from disk; @@ escapes a literal leading @; mutually exclusive with —table)
--subtitle-columnstringColumn rendered as the card subtitle (optional)
--tablestringLocal-database table (mutually exclusive with —sql)
--title-columnstringColumn rendered as the card title [required]
FlagTypeDefaultDescription
--app-dirstring.Path to the APEX application directory
--json-prettyOutput in pretty-printed JSON (human-readable) instead of minified JSON
--toonOutput in TOON format (human-readable, token-efficient) instead of JSON

Using --dry-run to preview the generated construct (no files are written):

Terminal window
uc-apx --app-dir examples/brookstrut create region cards --page 46 --name Product Cards --table OOW_DEMO_PRODUCTS --pk-column PRODUCT_ID --title-column PRODUCT_NAME --dry-run
Generated APEXlang
region product-cards (
name: Product Cards
type: cards
source {
location: localDatabase
type: sqlQuery
sqlQuery:
```sql
select * from OOW_DEMO_PRODUCTS
```
}
layout {
sequence: 50
slot: body
}
appearance {
template: @/cards-container
templateOptions: #DEFAULT#
}
card {
primaryKeyColumn1: PRODUCT_ID
}
title {
column: PRODUCT_NAME
}
)