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]| Flag | Type | Default | Description |
|---|---|---|---|
--action | stringArray | Per-row action POS[:LABEL] (repeatable). POS ∈ link | |
--avatar-icon | string | Avatar icon: a static fa-* class or a column (emitted as &COL.) (plugin-avatar.icon) | |
--badge-label | string | Badge label (static text; plugin-badge.label) | |
--badge-value-column | string | Column mapped to the badge value (plugin-badge.value) | |
--column | string | Comma-separated columns the SQL projects. Syntax: NAME[:TYPE[:LENGTH]] [required] | |
--column-span | int | 12-col grid span for the region’s layout (0 = omit) | |
--description-column | string | Column mapped to the item description [required] | |
--display-avatar | Show an avatar (settings.displayAvatar: true + plugin-avatar block) | ||
--display-badge | Show a badge (settings.displayBadge: true + plugin-badge block) | ||
--dry-run | Print rendered region to stdout without writing | ||
--force | Replace an existing same-id region on the page | ||
--id | string | Region id (default: kebab-case of —name) | |
--name | string | Display name of the region [required] | |
--no-new-row | Emit startNewRow: false so this region sits next to the previous one | ||
--order-by | stringArray | Sort option KEY:CLAUSE (repeatable), e.g. TASK_NAME:‘TASK_NAME asc’. Requires —order-by-item | |
--order-by-item | string | Page item name driving the sort (orderBy.item.itemName) | |
--page | string | Target page (numeric ID, alias, or name) [required] | |
--pagination-rows | int | entitiesPerPage for pagination (0 = omit) | |
--pk-column | string | Column to flag as the primary key (optional) | |
--row-selection | string | Row selection: multiple, single, or focusOnly | |
--sequence | int | Layout sequence (default: max existing + 10) | |
--slot | string | body | Page slot to place the region in |
--sql | string | Inline SQL query (or @path/to/file.sql; @@ escapes a literal leading @) [required] | |
--title-column | string | Column mapped to the item title [required] |
Global Flags
Section titled “Global Flags”| Flag | Type | Default | Description |
|---|---|---|---|
--app-dir | string | . | Path to the APEX application directory |
--json-pretty | Output in pretty-printed JSON (human-readable) instead of minified JSON | ||
--toon | Output in TOON format (human-readable, token-efficient) instead of JSON |
Example Generated APEXlang
Section titled “Example Generated APEXlang”Using --dry-run to preview the generated construct (no files are written):
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-runGenerated 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 } ) )