2

I'm trying to build my first Gutenberg theme, and I want to build a page template with the layout as shown below:

template wireframe

Pre-Gutenberg I would have built widget areas into the page template to create the layout. i.e. widget areas for the sidebar, and widget area 1 + 2.

I'm trying to do this now with blocks, and I want to know what correct approach or best practise is for replacing widget areas in Gutenberg when developing themes, could this be achieved with InnerBlocks, or NestedBlocks? Or some other means? Can anyone point me to examples?

2
  • 2
    Problem is right now Gutenberg is only available in the content area through the editor. Phase 2 will include widgets as blocks.
    – Alvaro
    Commented Dec 30, 2018 at 12:45
  • 1
    @Alvaro any ideas when phase 2 will arrive?
    – benedict_w
    Commented Jan 3, 2019 at 10:45

1 Answer 1

1

Like @Alvaro said, You should start building blocks for widget areas. Once Phase 2 hit the core you can just simply show the blocks in other areas. Don't bother developing for Pre-Gutenberg widgets, You will double your work load.

2
  • Are you saying to build blocks instead of widgets now, if so how can these be used in widget areas?
    – benedict_w
    Commented Jan 3, 2019 at 10:45
  • 2
    Yes, Eventually The whole website will have block areas instead widget areas. So, you are making yourself full proof. And within this year, Once Phase 2 completes. Widget areas will be replaced with block areas. Commented Jan 3, 2019 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.