Skip to content

Site editor: Add template replace flow to template inspector #54562

@richtabor

Description

@richtabor

Twenty Twenty-Four is exploring adding alternate template types for the home, index, single and page templates. While the effort in #51477 brings alternate template selection to pages, templates still do not have this capability.

There's currently not a method for someone to swap a template directly with another templateType.

Current

Template swapping in the site editor, for pages:

CleanShot 2023-09-18 at 11 21 08

Proposed

If there are alternative templateTypes registered for a specific template, then surface the swapping functionality in the template inspector.

It could be in the verticalEllipsis menu (currently only there when customizations are present), or a button on the inspector, below the template's areas:

CleanShot 2023-09-18 at 11 38 07

I lean towards the verticalEllipsis method, as it's more in line with what we have in pages, and doesn't make it too surfaced. Eventually it'd be nice to see previews of the templates in the sidebar, but for a quick addition something like this seems simple enough.

Metadata

Metadata

Assignees

Labels

Needs Design FeedbackNeeds general design feedback.[Feature] Site EditorRelated to the overarching Site Editor (formerly "full site editing")[Status] In ProgressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions