Skip to content

uc-apx create region media-list

Insert a themeTemplateComponent/mediaList region backed by an inline SQL query — a compact list of items with a title, description, optional avatar and badge.

Required mappings: —title-column, —description-column.

Optional: —display-avatar (+ —avatar-icon), —display-badge (+ —badge-label / —badge-value-column), an item-driven sort (—order-by-item ITEM + —order-by KEY:CLAUSE), and a row link.

uc-apx create region media-list [flags]
FlagTypeDefaultDescription
--actionstringArrayPer-row action POS[:LABEL] (repeatable). POS ∈ link
--avatar-iconstringAvatar icon: a static fa-* class or a column (emitted as &COL.) (plugin-avatar.icon)
--badge-labelstringBadge label (static text; plugin-badge.label)
--badge-value-columnstringColumn mapped to the badge value (plugin-badge.value)
--columnstringComma-separated columns the SQL projects. Syntax: NAME[:TYPE[:LENGTH]] [required]
--column-spanint12-col grid span for the region’s layout (0 = omit)
--description-columnstringColumn mapped to the item description [required]
--display-avatarShow an avatar (settings.displayAvatar: true + plugin-avatar block)
--display-badgeShow a badge (settings.displayBadge: true + plugin-badge block)
--dry-runPrint rendered region to stdout without writing
--forceReplace an existing same-id region on the page
--idstringRegion id (default: kebab-case of —name)
--namestringDisplay name of the region [required]
--no-new-rowEmit startNewRow: false so this region sits next to the previous one
--order-bystringArraySort option KEY:CLAUSE (repeatable), e.g. TASK_NAME:‘TASK_NAME asc’. Requires —order-by-item
--order-by-itemstringPage item name driving the sort (orderBy.item.itemName)
--pagestringTarget page (numeric ID, alias, or name) [required]
--pagination-rowsintentitiesPerPage for pagination (0 = omit)
--pk-columnstringColumn to flag as the primary key (optional)
--row-selectionstringRow selection: multiple, single, or focusOnly
--sequenceintLayout sequence (default: max existing + 10)
--slotstringbodyPage slot to place the region in
--sqlstringInline SQL query (or @path/to/file.sql; @@ escapes a literal leading @) [required]
--title-columnstringColumn mapped to the item 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 media-list --page 46 --name Files --sql select id, name, descr from files --column ID:number,NAME,DESCR --pk-column ID --title-column NAME --description-column DESCR --dry-run
Generated APEXlang
region files (
name: Files
type: themeTemplateComponent/mediaList
source {
location: localDatabase
type: sqlQuery
sqlQuery:
```sql
select id, name, descr from files
```
}
layout {
sequence: 50
slot: body
}
appearance {
template: @/blank-with-attributes-no-grid
templateOptions: #DEFAULT#
}
componentAppearance {
display: report
}
settings {
title: NAME
description: DESCR
}
column ID (
layout {
sequence: 10
}
source {
databaseColumn: ID
dataType: number
primaryKey: true
}
)
column NAME (
layout {
sequence: 20
}
source {
databaseColumn: NAME
dataType: varchar2
}
)
column DESCR (
layout {
sequence: 30
}
source {
databaseColumn: DESCR
dataType: varchar2
}
)
)