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

Inserting a template/reusable block into every page after they have been created. #12518

Closed
paaljoachim opened this issue Dec 2, 2018 · 5 comments
Labels
Needs Design Feedback Needs general design feedback. Needs Technical Feedback Needs testing from a developer perspective.
Milestone

Comments

@paaljoachim
Copy link
Contributor

Phase 2.

The case is this:
I have made lots of pages, and then suddenly I notice that I forgot to add a message at the bottom of each page (before the footer). How would I go about adding the additional block into each page after I have already created them? What about selecting which page/post to add the specific reusable block/template block into?

Today I would have to manually go into each page/post and add the missing message/image etc.

@swissspidy swissspidy added Needs Design Feedback Needs general design feedback. Needs Technical Feedback Needs testing from a developer perspective. labels Dec 2, 2018
@swissspidy
Copy link
Member

I can't think of any great UX for such bulk operations off the top of my head. It's not something that has been previously possible in WordPress core and I can't find a plugin that does that either.

@paaljoachim
Copy link
Contributor Author

paaljoachim commented Dec 2, 2018

I am thinking we can just put the case (this issue) into the phase 2 ideas bag. As it can perhaps create some inspiration along the way.

Today one would likely create a widget area above the footer. Install a conditionals widget plugin to where the widget should show up.

In phase 2. One could add a global block. Add conditionals to where the specific global block is to be seen. Then add the content. The block could then be locked in place, not able to be moved, except by editing the global blocks position and content. The global block and content would then automatically be added to all the pages/posts defined through the conditionals.

EDIT:
Global blocks could also automatically be added at various locations of a new post/page. Showing up as locked global blocks. For instance creating a Custom Post Type with a preset global CPT layout as meta boxes. This means one could create a template layout page. Save it as a template and then use it for all CPT or other specific pages/posts. A template would be somewhat similar to reusable blocks.

Reusable blocks = save 1 or a few blocks into a reusable blocks area.
Template = save a full page layout as a template. Use the template for specific kinds of pages or posts.
Global Blocks = perhaps a mix of both reusable blocks and template adding conditionals to it. (Conditionals could be added to all three areas.)

@melchoyce melchoyce added this to the Future: Phase 2 milestone Dec 3, 2018
@mapk
Copy link
Contributor

mapk commented Jan 4, 2019

Interesting concept! I wonder if something like a global block would be a block-per-block setting (some blocks have it, some don't?) and only exist outside of the post_content? This would allow the user to position it on the site like between the post_content and the footer. Or if it existed inside the post_content, there'd need to be a way to designate where in each post it would live. Does that sound right?

@paaljoachim
Copy link
Contributor Author

Hey Mark

" I wonder if something like a global block would be a block-per-block setting (some blocks have it, some don't?)"

Yeah. Options could be changed per page/post block settings. If one begins to change the content then one will need to have a warning message come up that says something like:
Changing content will affect all global blocks. Proceed? Yes-No. (I am also thinking that there could be a lock checkbox in the settings so that one does not accidentally trigger the warning message.)
Change Global block into a local per page/post block? Yes-No
Then a cancel button.

"and only exist outside of the post_content? This would allow the user to position it on the site like between the post_content and the footer. Or if it existed inside the post_content, there'd need to be a way to designate where in each post it would live. Does that sound right?"

I am just thinking UI not the technical aspect of it.
Lets say that I created a global block (which would also end up as a sidebar area in the widgets screen and customizer outside of Gutenberg) I would be similar to today creating a sidebar area.
So that means global blocks = sidebar area. That means for instance having another blocks section called Global. One drags out the global block and adds it to the layout like any other block (should contain a global block border color). Then adds various other blocks to it.

The scenario: User opens Global blocks and drags out a sidebar area. Places it into the layout (I have not thought about how that would work for instance having the sidebar take up the full left side of the layout or part of the left side). Then adds the blocks user wants into it. Selects the Global block. Goes to the settings and selects through the conditionals where to show the sidebar.

post_content = Perhaps everything except global blocks (sidebar widget areas).

btw
I added some wireframes here: #13031

@youknowriad
Copy link
Contributor

It seems like this falls into the template work planned for phase 2 at some point #13489 I can see a template composed of smaller templates (header/footer/sidebar...) where people could go edit these particular sub templates and see the change everywhere on their website.

I'm going to close this issue at the moment as there's nothing really actionable and I think it served its purpose as a way to inspire and think about these future interactions.

Details can be flushed out later once we reach that stage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Design Feedback Needs general design feedback. Needs Technical Feedback Needs testing from a developer perspective.
Projects
None yet
Development

No branches or pull requests

5 participants