Skip to content

Enable the user to switch which entity is being previewed in the template editor #28466

Open
@jameskoster

Description

The existing flow from editing a post to editing the post template creates a view where the user is editing a template with a specific entity loaded in to provide context.

In the site editor it is also currently possible to edit a template without any context, and see placeholder content in lieu of actual post data.

Since all the pieces exist to do so, we should consider allowing the user to switch which entity is being previewed while editing a template. This will be a useful tool to ensure that any template edits in the current session will play nicely with a variety of compatible entires.

We can utilise the "View" menu (proposed in #27847) to contain this affordance.

Because the organisation of content can get quite complicated on larger sites, we might use the drilldown pattern from the site editor navigation to keep this menu simple:

content.mp4

It is (hopefully) quite easy to imagine different sections for different content types.

Once content is selected, an interstitial indicates which blocks are looking up post data.

Activity

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

Metadata

Assignees

No one assigned

    Labels

    Needs Design FeedbackNeeds general design feedback.[Feature] Site EditorRelated to the overarching Site Editor (formerly "full site editing")[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions