Skip to content

Entry type relabeling#16453

Merged
brandonkelly merged 6 commits into5.6from
feature/cms-1294-entry-type-relabelling
Jan 19, 2025
Merged

Entry type relabeling#16453
brandonkelly merged 6 commits into5.6from
feature/cms-1294-entry-type-relabelling

Conversation

@brandonkelly
Copy link
Copy Markdown
Member

@brandonkelly brandonkelly commented Jan 19, 2025

Description

Adds the ability to override entry types’ names and handles on a per-section/field basis.

A Matrix field’s settings with two entry types selected. The first entry type is selected, and a slideout is open showing Name and Handle fields with overridden values.

The UI for it works identically to custom fields within field layout designers: double-click on an entry type (or press the “Settings” action menu item), and a slideout will open showing a chip with the original entry type details, plus “Name” and “Handle” fields. Setting those fields will only affect the entry type’s name/handle within the context of the section/field you’re editing.

Plus, the global_entry_types and entrify_matrix_blocks Craft 5 migrations have been updated to preserve sections’/Matrix fields’ original entry type handles, for any handles that need to be renamed for uniqueness. (They’ve also been updated to stop changing entry types’ names for uniqueness, since entry type names dropped the unique requirement in Craft 5.3.)

The entry-types/merge command has also been updated to preserve the outgoing entry type’s name and handle, for any usages that support the overrides.

Related issues

@linear
Copy link
Copy Markdown

linear Bot commented Jan 19, 2025

@brandonkelly brandonkelly changed the base branch from 5.x to 5.6 January 19, 2025 16:16
Entry types dropped the unique validation rule in 5.3

[ci skip]
[ci skip]
@brandonkelly brandonkelly merged commit b0df6db into 5.6 Jan 19, 2025
@brandonkelly brandonkelly deleted the feature/cms-1294-entry-type-relabelling branch January 19, 2025 16:59
@brandonkelly brandonkelly changed the title Entry type relabelling Entry type relabeling Jan 21, 2025
@rob-c-baker
Copy link
Copy Markdown

This looks like great news - I'm hoping it means that for sites already upgraded, with integers appended to entry type handles all over the place, that can now be undone with the entry type merge command? I am guessing it depends on the detail of each case and whether the outgoing type is the one to keep?

@brandonkelly
Copy link
Copy Markdown
Member Author

@rob-c-baker You could already use the entry-types/merge command to reduce the number of entry types, where that makes sense.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants