Gutenberg is the new default in WordPress since the 5.0 release.This page, along with its child pages, explains how to use the new Gutenberg editor with Toolset.
What you will learn:
- How to enable Gutenberg editor for your custom post types.
- What are the new Toolset blocks in the Gutenberg editor.
- How to design Views, Content Templates, and Pages using the Gutenberg editor.
Switching existing sites to use the new Block (Gutenberg) editor can be very challenging. This is especially true when using many plugins and a complex site structure. This is why Toolset allows you to select the editor on a per-post basis. This way, you can switch to the new editor gradually. You can enable Gutenberg to edit new posts. When you see that it’s all good, you can switch it over for editing old posts. And so on. This allows you to make sure you’re not breaking anything and that nothing is missing.
There are two way to select an editor you want to use for a certain post type: Toolset Dashboard or when editing a post type from the Toolset -> Post Types page.
You can choose between the Block (Gutenberg), Classic editor or Per post. On the same page, you can select custom taxonomies that will be shown when using the (Gutenberg) editor.
If you have selected Per post option you will be able to choose an editor for each post individually when editing it. This also means that If you have started editing a post in one editor you can switch to another one at any time.
If you are using the Gutenberg plugin, you must enable the show_in_rest option for the custom post type you want to use this editor for.
- Go to Toolset -> Post Types.
- Click to edit the Post Type for which you want to enable the Gutenberg Editor.
- In the Edit Post Type screen, scroll down to the Options section.
- Check the show_in_rest option and click to save the changes.
If you now add a new post for this post type, you will be able to edit it with the Gutenberg editor:
If you have any custom fields available for this post type, you will see them in the Gutenberg editor:
When you want to enter shortcodes you can do it both in the native Classic editor and the Paragraph blocks. You can also use shortcodes with the existing button for conditional output by Views.
Toolset provides four new blocks for the Gutenberg Editor:
- View block
- Content Template block
- Toolset Form block
- Map block
The View block allows you to insert a View into your Gutenberg Editor and control the View output by using the block attributes.
When you change the attributes, the View preview is updated on-the-fly and reflects your parameters.
Using the View block, you insert one of your existing Views.
The Content Template block allows you to insert a content template into your Gutenberg Editor.
Note that when using the Content Template block, you insert existing content templates into your content. You can choose only from “stand-alone” Content Templates. This means that the content templates that are used in a View loop will not appear in the list of your Content Template block.
The Toolset Form block allows you to insert a form into your Gutenberg design. Using this block, you insert one of your existing Forms. You can insert any type of a Toolset form, including Post, User and Relationship.
When creating a View, you can use the Gutenberg Editor inside the View Template to design the output of the current item in the View loop.
You can also use Gutenberg editor to design Content Templates. Please review the step-by-step tutorial on how to create Content Templates with Gutenberg.
The development of Toolset integration with the Gutenberg editor is still in progress, as well as the Gutenberg core itself. Here are some frequently asked questions about this integration.
For inserting forms use the Toolset Form block. For accessing other Toolset Forms features use the HTML block -> Toolset Forms button.
Using Gutenberg and Toolset Layouts at the same time is not possible. If you try to use Gutenberg to edit a post that was designed with Layouts then Gutenberg will be blocked.
The Access button for conditional output based on user roles is located in the Paragraph block.
If you have any other questions on how to use Toolset with Gutenberg, please post them in the comments of the accompanying blog post: