Skip to content

[EPIC] Content Drive: Add Content #35438

Closed
2 of 2 issues completed
Closed

Description

@fmontes

Overview

Modal content type picker triggered by the "+ Add New" button. Provides tabbed navigation (Content, Widgets, Favorites), real-time filtering, and right-click favorites for fast access in instances with hundreds or thousands of content types.

Quarter: Q2 2026
Pillar: Content Drive
Theme: Content Authoring


Problem

Clicking "+ Add New" requires users to select a content type before creating content. In large dotCMS instances, there can be hundreds or thousands of content types. A flat list or simple dropdown doesn't scale — users need filtering and personalization to find their types quickly.


Solution

Trigger

Clicking "+ Add New" immediately opens the Content Type Picker modal. No intermediate dropdown.

Modal Layout

  • Header: "Add New Content" + close button
  • Tab bar: Content (default), Widgets, Favorites
  • Filter input: Filters the active tab in real time, matching name and description
  • Content type list: Each row shows icon, name (semi-bold), and description (gray, one line)

Tab Behavior

Tab Contents
Content (default) All content types with base type = Content
Widgets All content types with base type = Widget
Favorites User's favorited types (both Content and Widget)

Switching tabs clears the filter.

Favorites

  • Right-click any content type to add/remove from favorites
  • Stored in browser localStorage per user
  • Empty state: "No favorites yet. Right-click any content type to add it to your favorites for quick access."

Selection

Clicking a row opens the content creation screen.


Dependencies

  • Content Drive Phase 1
  • Content type API (list types with base type, icon, name, description)

Out of Scope (v1)

  • Server-side favorite persistence
  • Drag to reorder favorites
  • Recently used content types tab

User Stories

Rose (Content Creator): Click "+ Add New" and quickly find Blog from hundreds of types. Favorite the 5 types I use daily. Filter by typing "blog" to narrow the list.

Jayden (Site Administrator): Know the picker separates Content from Widgets. Trust that users can personalize with favorites without admin setup.

Sub-issues

Sub-issues

2 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. added theissue type on Apr 24, 2026
  2. changed the issue type fromtoon Apr 24, 2026
  3. moved this from New to Next Sprint in dotCMS - Product Planningon May 5, 2026
  4. changed the title [-]Content Drive: Add Content (EPICID-192)[/-] [+][EPIC] Content Drive: Add Content[/+] on Oct 7, 2026
  5. github-actions commented on Nov 23, 2026

    @github-actions
    Contributor

    Documentation Assessment: Content Drive — Add Content (#35438)

    action: update
    urlTitle: content-type-api

    Determination

    This Epic shipped in two layers, and they need very different treatment:

    1. The "New" button / content-type picker (sub-issue [TASK] Content Drive: "New" button menu with type selection #35574, PR feat(content-drive): New button menu with content type selection (#35574) #36079). This is the end-user-facing deliverable: a toolbar New menu in Content Drive offering "All Content Types," one entry per base type (excluding Form), and "Folder," plus a standalone Upload button. I checked the existing docs page "Creating and Uploading in Content Drive" (content-drive-create-and-upload, last modified 2026-10-30 — after every PR in this Epic merged) and it already describes exactly this behavior: the New menu, the Select a Content Type dialog, and the separated Upload button. It also correctly reflects that the shipped feature diverged from the Epic's original "Content/Widgets/Favorites" tabbed-modal vision — no Favorites tab or right-click favoriting reached Content Drive's New menu in what actually merged, and the docs don't claim one exists. No update needed here — the docs team already captured the as-built feature.

    2. The content-type list endpoint changes (sub-issue [TASK] Content type list endpoint — support excluding system types + global sort across base types #36072, PRs feat(contenttype): add optional 'system' query param to exclude system types (#36072) #36669 and fix(contenttype): globally sort multi-type content-type list before paginating in cache mode (#36072) #36671). This is a backend API change with two parts:

      • New system query parameter on GET /api/v1/contenttype (PR feat(contenttype): add optional 'system' query param to exclude system types (#36072) #36669): an optional, backward-compatible boolean that excludes non-creatable system content types (e.g., Host, Favorite Page) from results. This is a genuine new capability on a public, documented REST endpoint — exactly the kind of addition the existing "Content Type API" page already documents when it happens (see its "Retrieve All Content Types by Site(s)" section, added for the sites parameter). The current page has no mention of system, so there's a real gap.
      • Global sort fix across base types (PR fix(contenttype): globally sort multi-type content-type list before paginating in cache mode (#36072) #36671): a pagination correctness bug fix with no API contract change (openapi.yaml unchanged) and no new parameter — it just makes orderby=name behave as already documented when multiple type filters are combined. There is nothing new to document for this part; it is bug-fix in nature, not a change in documented behavior, so it is excluded from the draft below.

    The system parameter has enough concrete technical detail to document accurately: parameter name, type, default, backward-compatibility guarantee, and how it combines with filter — all confirmed directly in the endpoint's @Parameter annotation and the PR description.

    Differential

    Page: content-type-api ("Content Type API")

    Change: Add a new subsection documenting the system query parameter, placed after "Retrieve All Content Types by Site(s)" and before "Create a Content Type," following the same pattern used for the sites parameter.

    • New param: system (boolean, default true).
    • Omitted or true → current/unchanged behavior: system content types (e.g., Host, Favorite Page) are included.
    • system=false → system content types are excluded from the results, including from the total/pagination count (no off-by-one needed on the client).
    • Combines with filter (name search) in the same request.
    • Applies uniformly whether one or multiple type values are requested.

    No other existing section needs changes.

    Audience and Grouping

    • Grouped with: the existing "Content Type API" page — this is an additive query parameter on an endpoint already documented there, not a new page.
    • Personas: developers and integrators building custom tooling against the Content Type REST API (admin UI customizations, migration scripts, third-party content-type browsers) who want to exclude non-creatable system types from listings they present to end users.
    • Not customer-facing UI documentation: Content Drive's own picker already filters these types for its users; this doc change serves API consumers directly, not Content Drive's end-user guide.
    Documentation Draft

    Content Type API

    urlTitle: content-type-api
    modified: 2025-03-07 15:18:25.2

    You can use the dotCMS REST API to manage Content Types. Content Types can be created, updated, copied, and deleted via REST API. In addition, Content Type Fields and Content Type Field Variables can also be managed via REST API.

    In the curl examples below, admin passwords are assumed to be admin, as on the demo site. However, this is no longer the default; now, admin passwords default to a random string generated on first startup and displayed in the server logs. This starter password can also be pre-configured through the DOT_INITIAL_ADMIN_PASSWORD environment variable.

    Get All Content Types {#GetContentType}

    Usage {#GetUsage}

    GET /v1/contenttype/

    Example {#GetExample}

    The following curl command retrieves all Content Types:

    curl -v -u admin@dotcms.com:admin -XGET http://localhost:8082/api/v1/contenttype/
    

    Get a Specific Content Type {#GetSingleContentType}

    Usage {#GetUsage}

    GET /v1/contenttype/id/{typeId}

    Example {#GetExample}

    The following curl command retrieves a specific field by ID, and returns all the properties of the field:

    curl -v -u admin@dotcms.com:admin -XGET http://localhost:8082/api/v1/contenttype/id/4c441ada-944a-43af-a653-9bb4f3f0cb2b
    

    Retrieve All Content Types by Site(s) {#GetContentTypeBySites}

    Usage {#GetUsage}

    Uses the sites query parameter (added in dotCMS 24.03.22), which accepts a comma-separated list of Site identifiers or keys.

    GET /v1/contenttype?sites={siteKey1|siteId1,siteKey2|siteId2}

    Example {#GetExample}

    The following curl command retrieves all Content Types belonging to the System Host and the default site:

    curl -v -u admin@dotcms.com:admin -XGET http://localhost:8082/api/v1/contenttype?sites=SYSTEM_HOST,default
    

    Excluding System Content Types {#ExcludeSystemContentTypes}

    Usage {#ExcludeSystemUsage}

    Uses the system query parameter (boolean, default true) on GET /v1/contenttype.

    GET /v1/contenttype?system={true|false}

    • Omitted, or set to true: system Content Types (such as Host and Favorite Page) are included in the response. This is the default and matches prior behavior.
    • Set to false: system Content Types are excluded from the response and from the pagination total, so counts stay exact.

    Some system Content Types share a base type with regular content — for example, Favorite Page has base type CONTENT — so filtering by type alone cannot exclude them. Use system=false when you need a list of only the Content Types your users can actually create.

    system can be combined with filter (name search) in the same request, and applies consistently whether you request a single type or several.

    Example {#ExcludeSystemExample}

    The following curl command retrieves all CONTENT base type Content Types, excluding system types such as Favorite Page:

    curl -v -u admin@dotcms.com:admin -XGET http://localhost:8082/api/v1/contenttype?type=CONTENT&system=false
    

    Create a Content Type {#CreateContentType}

    Usage {#CreateUsage}

    POST /v1/contenttype

    Note: The JSON object also needs to be defined - please see below.

    Example {#CreateExample}

    The following curl command creates a new Content Type, using the bodyCreate.json file, which includes all the properties required to create the new Content Type:

    curl -v -u admin@dotcms.com:admin -XPOST http://localhost:8082/api/v1/contenttype -H "Content-Type: application/json" --data @bodyCreate.json
    

    Payload {#CreatePayload}

    The command above passes a file called bodyCreate.json which contains the following new Content Type properties in order to create the specified Content Type. The contents of the bodyCreate.json file are shown below:

    {
        "clazz": "com.dotcms.contenttype.model.type.ImmutableSimpleContentType", 
        "defaultType": false, 
        "name": "The Content Type 1", 
        "description": "THE DESCRIPTION", 
        "host": "48190c8c-42c4-46af-8d1a-0cd5db894797", 
        "owner": "dotcms.org.1", 
        "variable": "TheContentType1",
        "fixed": false, 
        "system": false, 
        "folder": "SYSTEM_FOLDER",
        "workflow":[
            "d61a59e1-a49c-46f2-a929-db2b4bfa88b2"
        ]
    }

    Note: The "workflow" property specifies the identifier of the Workflow to assign to the Content Type. If the "workflow" property is not supplied in the payload, the content type will be unassigned.

    The json object properties of any new Content Type can be seen by examining the json view link when editing a Content Type.

    Creating Content Types of Different Base Types: For examples of how to create a Content Type of other Base Content Types, please see the Create Content Types of each Base Type documentation.

    Copy a Content Type {#CopyContentType}

    Usage {#CopyUsage}

    POST /v1/contenttype/{typeID}/_copy

    Example {#CopyExample}

    The following command creates a copy of the Content Type with the variable name exampleContentType:

    curl -v -u admin@dotcms.com:admin -XPOST http://localhost:8082/api/v1/contenttype/exampleContentType/_copy -H "Content-Type: application/json" --data @ctCopy.json
    

    Payload {#CopyPayload}

    The command above passes a file called ctCopy.json which contains from one to five properties; only "name" is required, while the others are optional:

    {
        "name": "Copy of Example Content Type",
        "variable": "exampleContentType2",
        "folder": "SYSTEM_FOLDER",
        "host": "48190c8c-42c4-46af-8d1a-0cd5db894797",
        "icon": "text_snippet"
    }

    Update a Content Type {#UpdateAContentType}

    Usage {#UpdateUsage}

    PUT /v1/contenttype/id/{typeId}

    Note: The JSON object also needs to be defined - please see below.


    Important

    When updating a Content Type using the REST API, you must submit all fields for a Content Type each time you update it.

    • If you wish to update only a single field (while maintaining all other existing fields), you must first read all existing fields so you can include them when updating the Content Type.
    • Any fields which are not included when you update a Content Type via the REST API will be removed from that Content Type.

    Example {#UpdateExample}

    The following command updates an existing Content Type (by ID), using the bodyUpdate.json file to define the json object required to update the Content Type's properties.

    curl -v -u admin@dotcms.com:admin -XPUT http://localhost:8082/api/v1/contenttype/id/39fecdb0-46cc-40a9-a056-f2e1a80ea78c -H "Content-Type: application/json" --data @bodyUpdate.json
    

    Payload {#UpdatePayload}

    The command above passes a file called bodyUpdate.json which contains the new Content Type properties that will be used to Update the specified Content Type. The contents of the bodyUpdate.json file are shown below:

    {
    	"clazz": "com.dotcms.contenttype.model.type.ImmutableSimpleContentType", 
    	"defaultType": false,
    	"id": "39fecdb0-46cc-40a9-a056-f2e1a80ea78c",
    	"name": "The Content Type 2",
    	"description": "THE DESCRIPTION 2",
    	"host": "48190c8c-42c4-46af-8d1a-0cd5db894797",
    	"owner": "dotcms.org.1",
    	"variable": "TheContentType1",
    	"fixed": false,
    	"system": false,
    	"folder": "SYSTEM_FOLDER"
        "workflow":[
            "d61a59e1-a49c-46f2-a929-db2b4bfa88b2"
        ]
    }

    The json object properties of any Content Type can be seen by examining the json view link when editing a Content Type.

    Add Default Actions to a Content Type {#defaultActions}

    The Default Actions for any Content Type may be specified either when creating or updating a Content Type, by adding a `` value to the payload, in the following format:

        "systemActionMappings":{
            "NEW":"ceca71a0-deee-4999-bd47-b01baa1bcfc8"
        },

    In the above example, the "NEW" specifies that this is the Default Workflow Action to apply to new content created without invoking a workflow (such as when uploading files via dotCLI), and the identifier is the ID of the Workflow Action to use for this Default Action.

    The following operations can be specified in the systemActionMappings property:

    Operation Executed When Content Is
    "NEW" Created for the first time
    "EDIT" Saved/updated
    "PUBLISH" Published
    "UNPUBLISH" Unpublished
    "ARCHIVE" Archived
    "UNARCHIVE" Unarchived
    "DELETE" Deleted
    "DESTROY" Destroyed

    The identifier may reference any Workflow Action which is available to the Content Type, in any Step of any Workflow Scheme which is assigned to the Content Type.

    Example {#DefaultActionExample}

    The following command is the same command to update an existing Content Type (by ID) used in the example above:

    curl -v -u admin@dotcms.com:admin -XPUT http://localhost:8082/api/v1/contenttype/id/39fecdb0-46cc-40a9-a056-f2e1a80ea78c -H "Content-Type: application/json" --data @bodyUpdate.json
    

    Payload {#DefaultActionPayload}

    To add or change the Default Actions for the Content Type, the only change required is to add the systemActionMappings property to the payload, as follows:

    {
    	"clazz": "com.dotcms.contenttype.model.type.ImmutableSimpleContentType", 
    	"defaultType": false,
    	"id": "39fecdb0-46cc-40a9-a056-f2e1a80ea78c",
    	"name": "The Content Type 2",
    	"description": "THE DESCRIPTION 2",
    	"host": "48190c8c-42c4-46af-8d1a-0cd5db894797",
    	"owner": "dotcms.org.1",
    	"variable": "TheContentType1",
    	"fixed": false,
    	"system": false,
    	"folder": "SYSTEM_FOLDER",
        "workflow":[
            "d61a59e1-a49c-46f2-a929-db2b4bfa88b2"
        ]
        "systemActionMappings":{
            "NEW":"ceca71a0-deee-4999-bd47-b01baa1bcfc8"
        }
    }

    Delete a Content Type {#DeleteContentType}

    Usage {#DeleteUsage}

    DELETE /v1/contenttype/id/{typeId}

    Example {#DeleteExample}

    The following command deletes the field specified by identifier, from the specified Content Type (by identifier):

    curl -v -u admin@dotcms.com:admin -XDELETE http://localhost:8082/api/v1/contenttype/id/05c64f1d-2d39-4b93-95c4-99d72ebe869a
    

    Quick Access from the Content Types Screen {#QuickAccess}

    You can quickly access the Content Type API from the dotCMS back-end via the API button on the Content Type editing screen:

    1. Select Types & Tags -> Content Types.
    2. Select a Content Type from the list.
    3. Click the API button next to the Content Type name.

    The API button in the Content Types screen

    A REST API call to the Content Type API will be executed for the selected Content Type, and the results will be displayed in a new browser tab:

    The results of the API call, displayed in a new tab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions