Repository navigation
Description
Description
Part of epic #33280 (Select columns to show on table).
Make the Content Drive results table support extra, dynamic columns on top of its fixed set (name, status, locale, type, edited-by, last-edited, actions).
For the Content Drive context: when a single content type is selected in the filters, the extra columns are that content type's "Show In List" fields (field.listed === true), inserted right after the Type column. They follow the selected content type automatically — no manual picking. With multiple/no content type selected, only the fixed columns show.
Note: this delivers the epic's goal via a different solution than the epic's original "context-menu picker" note — columns are derived from the content type's Show In List fields, reusing the field data we already fetch for User Searchable.
Approach
1. Splice a dynamic columns block into the table — libs/portlets/dot-content-drive/ui/src/lib/dot-folder-list-view/
- Only the Show In List columns are dynamic — keep every fixed column exactly as it is today (header entries + the hand-written
<tbody>cells with their custom rendering). No full table generalization; this keeps things simple. - Add an
extraColumnsinput and render it as a block inserted immediately after the Type (contentType) column, in both the header and the body:- Header: emit the extra column headers right after the Type
<th>. - Body: right after the Type
<td>,@forover the extra columns rendering the field value generically (e.g.item[column.field]with a default renderer). - Skeleton: same insertion so the loading row matches.
- Header: emit the extra column headers right after the Type
- Update the hardcoded
colspan/SKELETON_SPANto include the extra-column count. Widths: the extra columns take their own space after Type (fixed-layout percentages may need a light rebalance).
Per the table's original design it's already set up to accommodate this — the change is a localized insertion after the Type column, not a rewrite.
2. Derive Content Drive extra columns from "Show In List" fields
- Reuse the field fetch built for User Searchable: single-selected-content-type detection (
$activeContentType) +DotContentTypeService.getContentType(variable)— the response already returns every field, so no extra request is needed. - Filter with
field.listed(instead of the User Searchablesearchable && indexedpredicate) to get the Show In List fields. - Expose them on the store (e.g. a
showInListFieldssignal alongsideuserSearchableFields) and pass them to the table asextraColumns.
Acceptance Criteria
-
dot-folder-list-viewaccepts anextraColumnsinput and renders those columns after the Type column (header, body, skeleton all in sync). - Fixed columns are unchanged — they keep their hardcoded custom rendering (thumbnail, status, locale, relative date, actions).
-
colspan/ skeleton span account for the extra columns (no hardcoded mismatch). - In Content Drive, selecting a single content type adds that type's Show In List (
listed) fields as extra columns. - Selecting multiple content types or none shows only the fixed columns.
- The column set updates reactively when the selected content type changes (and clears with the filter).
Technical Notes
- Table:
libs/portlets/dot-content-drive/ui/src/lib/dot-folder-list-view/— columns arrayHEADER_COLUMNSandDotFolderListViewColumnin.../ui/src/lib/shared/{constants,models}.ts. Header/skeleton already loop the array; the<tbody>cells andcolspanare the parts to touch. - Show In List flag:
DotCMSContentTypeField.listed—libs/dotcms-models/src/lib/dot-content-types.model.ts. - Field fetch to reuse:
dot-content-drive-field-filter-menu.component.ts($activeContentType,getContentType().fields, per-type cache) + store signals indot-content-drive.store.ts(userSearchableFields,setUserSearchableFields,clearUserSearchableFilters). Add a parallel Show-In-List path off the same fetch.
Out of Scope
- Manual column selection / column-picker UI (the epic's original framing).
- Creating or defining new columns or fields.
- Persisting column preferences per user.
- Extra columns for contexts other than Content Drive (the table stays agnostic; only the Content Drive derivation is in scope here).
Additional Context
Epic: #33280
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
github-actions commentedon Jul 27, 2026
PRs linked to this issue
dario-daza commentedon Jul 29, 2026
✅ PASSED QA:
QA-content-drive-show-list.mov
Note For the Custom Field:
Tested a Custom Field with "Show in List" enabled, using Default Value = #set($x="Hello")$x.
Result: Content Drive's column shows the literal raw text #set($x="Hello")$x, not the evaluated Hello.
Confirms: Content Drive never evaluates Velocity for any field — it only displays the raw, already-stored per-contentlet value. A Custom Field's "Value" box (the code editor) is Velocity source used only in specific render contexts (e.g. page/container rendering, edit-content iframe widgets) and is never stored per-contentlet or shown in Content Drive; only "Default Value" seeds the actual stored value that list/browse views display.
This is not a Content Drive defect, it's expected behavior given how Custom Field is designed.