Editing templates in Gutenberg

Is it possible to edit templates in Gutenberg? When viewing a template in Wordpress admin it’s not possible to edit it in Gutenberg from what I can see.

Use case
There are custom Gutenberg Blocks I would like to use inside a page built in Bricks. It would be pretty convenient if you could create a new section template, edit it in Gutenberg with the custom blocks I want to use and then add it as a Template element inside the page built in Bricks.

Hi Robin,
I’m not sure if I understand this correctly, but is it possible to create shortcodes for your custom blocks?

If yes you can use the shortcode element in Bricks and use them with it.

Best regards,
timmse

Hi timmse,

Thanks for your answer! I think you are misunderstanding my question. I don’t think it’s feasible to assume that any custom block would have shortcodes available but I may be wrong about that. And to be clear I’m not making a custom Gutenberg block myself, I said custom Gutenberg blocks to mean any kind of block that plugins have that extend Gutenberg, e.g. Ultimate Addons for Gutenberg and Kadence Blocks.

So what I would like to do is to insert Gutenberg blocks like these in Bricks. From my understanding this is not possible directly in Bricks. So then I thought that it would be neat to at least be able to build a template (found in Bricks > Templates from WP admin panel) with one or several Gutenberg “custom” blocks using the Gutenberg editor and then insert it into any page built in Bricks using the Templates element. But when looking at a template I could not se an option to edit in Gutenberg from what I can see, see screenshot:

So my question is if my assessment that it’s not possible is correct or if there is a way to actually create templates using the Gutenberg editor.

And if not, is there another way to achieve a similar result? E.g. create a normal page instead, edit it in Gutenberg, and then insert it into the page that’s built in Bricks.

Hope I managed to clarify what I’m trying to ask. :slight_smile:

Hi Robin,
Thanks for the detailed explanation.

If the blocks are not available as shortcodes, you can only use them in Gutenberg.
You can, of course, create your Posts & Pages in Gutenberg and then use the Post Content element within Bricks to output the content. In addition, within Gutenberg, you can insert previously created Bricks section templates using a shortcode.

Have you ever had a look at the Bricks Academy?
I hope this helps you a little bit.

Best regards,
timmse

Hi timmse, thanks for your answer.

Ok based on your answer I realise that there likely isn’t a way to achieve the intended use case. At least not without using additional plugins.

Using the Post Content element could be an option if you don’t need to repeat the same Gutenberg blocks across multiple pages and there is only one place for each page where you wish to display some Gutenberg blocks. So good idea to use that for that use case. But for what I was thinking about it’s a bit too limiting sadly.

Regarding inserting previously created Bricks sections using a shortcode in Gutenberg you’re saying that I could create everything I want to create in Bricks as Bricks sections and then edit the whole page in Gutenberg, add the Bricks sections and any Gutenberg blocks I need? That could indeed be an option. A bit sad to not use Bricks as the main editor though but a possible workaround option.

And yes, I’ve looked extensively at Bricks Academy and searched this forum and couldn’t find anything regarding editing templates in Gutenberg there or similar solutions.

Again, I think I’ve got my answer that it’s not possible to edit templates in Gutenberg and achieve the use case like I’ve wanted but thanks for bringing more clarity to the situation and alternative solutions timmse.

I’ve submitted the idea to edit templates in Gutenberg to the Ideas Board so let’s see if there is anyone else interested in this feature.

1 Like

@robin did have you found a way to achive the gutenberg block inside a bricks template or page?
I also need to use the gutenberg rss feed block inside a bricks page.

I don’t know if this will be helpful, but you can use a bricks template in Gutenberg: Mapping Bricks Templates to WordPress Templates – BricksLabs