Render template and support component operations in preview canvas

Created on 12 August 2025, 1 day ago

Overview

We need to be able to render the template in our preview canvas and be able to do component operations (drag and drop, delete, etc.) like how we can in our page preview canvas.

πŸ“Œ Refactor ApiLayoutController into 2 sub-class to support Content Templates Active

Proposed resolution

1. Define new routes in AppRoutes.tsx for the view modes in new Template menu ✨ Create new Templates menu Active .

2. Clicking a menu item should open the preview canvas e.g. /editor/template/node/article/full/1 and render the HTML response from GET call to new endpoint created in πŸ“Œ Refactor ApiLayoutController into 2 sub-class to support Content Templates Active .

Try to see if we can just use the existing redux slice of layoutModelSlice.ts for this. The poc/spike here: creates a new templateLayoutModelSlice.ts but it might be possible to just utilize layoutModelSlice.ts.

If it looks like its not possible, at the very least we can refactor so the separate slices can share the reducers. that might mean moving the reducers to its own file that can then be imported by both slices.

3. When the user is editing template, it should be open in the layers menu (See below screenshot)

Need to define DX, and perhaps product/design input....
Assuming we require the user to create at least one piece of content when viewing a template,
should clicking the view mode menu item direct the user to the first existing piece of content they have for that bundle? So for example if someone wants to view an article teaser template, and they have an existing article that is /node/5, should they be directed to /editor/template/node/article/teaser/5 from clicking the menu?

And if no content for the bundle exists yet, should they just be directed to /editor/template/node/article/teaser and then be presented with the "No content available" badge in the topbar?:

Do we still allow users to add to their template even without an existing piece of content?

User interface changes

✨ Feature request
Status

Active

Version

1.0

Component

Page builder

Created by

πŸ‡ΊπŸ‡ΈUnited States hooroomoo

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024