When you create a View, you can use the Gutenberg Editor inside your View Template to create the output of the current item in the View loop
The image below illustrates how this works.
You create and set up your View in the same manner as you would normally:
- Go to Toolset -> Dashboard
- Locate the custom post type for which you want to create the template; for example, “Books.”
- Click on the Create View button.
- Give your View a name. You are then taken to the Edit View screen.
- Scroll down to the Loop Output Editor.
- Click the Loop Wizard button.
- Choose your Loop output style, for example, the Bootstrap grid. Click Next.
- In the Choose fields tab:
- Add one field; for example, Post title.
- Check the Use a Content Template (…) option.
- Click Finish.
- Click Scroll Down to the Content Template.
In the Template for this View screen:
- Click the Update button. You need to save the template before switching to the Gutenberg Editor to avoid losing the changes you will make in the editor.
- Click the Gutenberg
- Click the Edit with Gutenberg button. The Edit Content Template screen opens in a new tab of your browser.
- Click the Edit with Gutenberg Editor button again.
The Gutenberg Editor opens.
In the Gutenberg Editor, you design your content by inserting blocks on your template.
You can use any block.
To insert your post fields and custom fields, you use the Custom HTML block:
- Insert the Custom HTML block.
- Click the Fields and View button.
After clicking the Fields and Views button, the classing dialog for inserting Toolset shortcodes opens and you can select any field to be inserted.
- You may add any other blocks to your template.
For example, in our template for the Recommended Books View, we added a paragraph block with fixed text (“Must read!”). Please see the screenshot that follows.
- Click Update to save your content template and return to your View.
- Save your View.
Your View is now ready. It can be inserted in a page, another View, or a content template.
Review the information in How to create a page in Gutenberg that uses different Views