Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New block: Editor content block - seeing template content in the backend of the associated page #62596

Open
paaljoachim opened this issue Jun 15, 2024 · 1 comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Feature] Template Editing Mode Related to the template editor available in the Block Editor New Block Suggestion for a new block [Type] Enhancement A suggestion for improvement.

Comments

@paaljoachim
Copy link
Contributor

paaljoachim commented Jun 15, 2024

What problem does this address?

NB. This issue is very likely associated with other similar issues.

An example.
Adding content to the Pages template. Like so:

Screenshot 2024-06-15 at 10 43 11

Going to edit a page.
Content added to the template will not be seen in the backend of the associated page.
Screenshot 2024-06-15 at 10 44 52

It does not give a hint that there is content added to the Page template.

One can only see the added Page template content by viewing the page on the frontend.
Screenshot 2024-06-15 at 10 46 47

This is not user friendly as the backend shows something different compared to the frontend.

What is your proposed solution?

We have the Post Content block in the Site Editor templates. It can not directly show the content as the content will be different for each page, but it gives us a hint to where the individual page content is located.

An Editor Content block can be used when additional content has been added to a template.
Pages template. Going to edit a page. One would then see something like this added template content when editing a page.

Screenshot 2024-06-15 at 10 53 28

It will become visible in the backend of all pages what content the Pages template has added.
This will make it possible to add Template content seen in each page. One could then setup a template for a specific page / CPT / Role and see it in the associated type of page. Clicking the Editor Content block a popup could perhaps be seen that can say go to Edit the Template or change the Template information to become a unsynced pattern to be used only for this page.

One could block the user from editing the template keeping the option in the popup to create an unsynced pattern.
This way one can add placeholders to the template and when the user goes to edit an associated page and click to have the template content unsynced the user would have to just fill in the placeholder blocks. Or when the user goes to edit an associated page that the template content is automatically unsynced so the user just fills in the blocks where the information is needed. (Learn does something similar here.)

One could block the user from creating an unsynced pattern then the option would be go to and edit the template.
One could block the user from doing anything keeping it locked. Similar to the Cart page in WooCommerce.

Associated video:
https://youtu.be/CFwEMRBxa3s?si=NHkPVkom2PL83Pud

Use case.
WooCommerce.
Cart page: Shows a Locked Filled Cart which can not be edited as this is only done in the associated Page: Cart template.
Checkout page: Shows template content which can be edited through the Checkout page. Meaning one can edit the Checkout page or the Page: Checkout template.
My account page: Shows a Shortcode. (Needs work) No template yet.
Shop page: Is blank. Does not show associated template name. It might be using the the Product Catalog template.

@paaljoachim paaljoachim added [Type] Enhancement A suggestion for improvement. New Block Suggestion for a new block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Feature] Template Editing Mode Related to the template editor available in the Block Editor labels Jun 15, 2024
@annezazu
Copy link
Contributor

Why would you not just use the “show template” option to see the full template? I don’t think we should be showing any piece of the template there otherwise and don't think this warrants a new block that also overlaps with the idea of "content".

It does not give a hint that there is content added to the Page template.

This is because you shouldn't put post or page content into a template. This is part of the work that's been done here #55025 to make it clearer when you're adding content in each section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Feature] Template Editing Mode Related to the template editor available in the Block Editor New Block Suggestion for a new block [Type] Enhancement A suggestion for improvement.
2 participants