gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Site editor: blockGap of template part block is not working

Open s56bouya opened this issue 3 years ago • 3 comments

Description

Template part block blockgap is not working in the site editor. blockgap is working on the template part block edit page.

I want blockgap to work.

<!-- wp:template-part {"slug":"header","tagName":"header"} /-->
<!-- wp:template-part {"slug":"main-singular","tagName":"main"} /-->
<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->

Step-by-step reproduction instructions

  1. Select templates and select singular template on site editor
  2. Select template part block
  3. Click on Edit button

Screenshots, screen recording, code snippet

https://user-images.githubusercontent.com/15373114/209264049-ccafb688-02bc-4b08-8066-86937d4d0200.mov

Environment info

WP 6.1.1 Twenty Twenty-Three 1.0 and other theme

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

s56bouya avatar Dec 23 '22 03:12 s56bouya

Hi! Layout and design features are not enabled for the template part. If they were enabled, the values would need to be adjusted on every single template part block individually, in every single template. That would defeat the purpose of the block, which is to show the same inner blocks in multiple places.

To use block gap inside a template part, you first need to add a block that supports block gap, for example a group, and then place your other blocks inside of it.

carolinan avatar Dec 28 '22 03:12 carolinan

hi.

Thank you for your answer.

To use block gap inside a template part, you first need to add a block that supports block gap, for example a group, and then place your other blocks inside of it.

I understand why its not working, that method solved the problem.

s56bouya avatar Dec 29 '22 02:12 s56bouya

Closing this out based on the above conversation :) Thanks so much for your insights @carolinan. If this needs to be re-opened, just let me know and I will do so.

annezazu avatar Jan 05 '23 16:01 annezazu