Understanding Gutenberg Blocks, Patterns, and Templates

Developers suffer in the great multitudes whom their sacred block-based websites cannot reach.

Johannes Gutenberg (probably)

Long time WordPresser, first time Gutenberger here. I’m a fan even though I’m still anchored to a classic/block hybrid setup. I believe Johanes himself …


Understanding Gutenberg Blocks, Patterns, and Templates originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.


This content originally appeared on CSS-Tricks and was authored by Geoff Graham

Developers suffer in the great multitudes whom their sacred block-based websites cannot reach.

Johannes Gutenberg (probably)

Long time WordPresser, first time Gutenberger here. I’m a fan even though I’m still anchored to a classic/block hybrid setup. I believe Johanes himself would be, too, trading feather pens for blocks. He was a forward-thinking 15th-century inventor, after all.

My enthusiasm for Gutenberg-ness is curbed at the theming level. I’ll sling blocks all day long in the Block Editor, but please, oh please, let me keep my classic PHP templates and the Template Hierarchy that comes with it. The separation between theming and editing is one I cherish. It’s not that the Site Editor and its full-site editing capabilities scare me. It’s more that I fail to see the architectural connection between the Site and Block Editors. There’s a connection for sure, so the failure of not understanding it is more on me than WordPress.

The WP Minute published a guide that clearly — and succinctly — describes the relationships between WordPress blocks, patterns, and templates. There are plenty of other places that do the same, but this guide is organized nicely in that it starts with the blocks as the lowest-level common denominator, then builds on top of it to show how patterns are comprised of blocks used for content layout, synced patterns are the same but are one of many that are edited together, and templates are full page layouts cobbled from different patterns and a sprinkle of other “theme blocks” that are the equivalent of global components in a design system, say a main nav or a post loop.

The guide outlines it much better, of course:

  1. Gutenberg Blocks: The smallest unit of content
  2. Patterns: Collections of blocks for reuse across your site
  3. Synced Patterns: Creating “master patterns” for site-wide updates
  4. Synced Pattern Overrides: Locking patterns while allowing specific edits
  5. Templates: The structural framework of your WordPress site

That “synced pattern overrides” is new to me. I’m familiar with synced patterns (with a giant nod to Ganesh Dahal) but must’ve missed that in the WordPress 6.6 release earlier this summer.

I’m not sure when or if I’ll ever go with a truly modern WordPress full-site editing setup wholesale, out-of-the-box. I don’t feel pressured to, and I believe WordPress doesn’t care one way or another. WordPress’s ultimate selling point has always been its flexibility (driven, of course, by the massive and supportive open-source community behind it). It’s still the “right” tool for many types of projects and likely will remain so as long as it maintains its support for classic, block, and hybrid architectures.


Understanding Gutenberg Blocks, Patterns, and Templates originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.


This content originally appeared on CSS-Tricks and was authored by Geoff Graham


Print Share Comment Cite Upload Translate Updates
APA

Geoff Graham | Sciencx (2024-08-26T17:27:16+00:00) Understanding Gutenberg Blocks, Patterns, and Templates. Retrieved from https://www.scien.cx/2024/08/26/understanding-gutenberg-blocks-patterns-and-templates/

MLA
" » Understanding Gutenberg Blocks, Patterns, and Templates." Geoff Graham | Sciencx - Monday August 26, 2024, https://www.scien.cx/2024/08/26/understanding-gutenberg-blocks-patterns-and-templates/
HARVARD
Geoff Graham | Sciencx Monday August 26, 2024 » Understanding Gutenberg Blocks, Patterns, and Templates., viewed ,<https://www.scien.cx/2024/08/26/understanding-gutenberg-blocks-patterns-and-templates/>
VANCOUVER
Geoff Graham | Sciencx - » Understanding Gutenberg Blocks, Patterns, and Templates. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/08/26/understanding-gutenberg-blocks-patterns-and-templates/
CHICAGO
" » Understanding Gutenberg Blocks, Patterns, and Templates." Geoff Graham | Sciencx - Accessed . https://www.scien.cx/2024/08/26/understanding-gutenberg-blocks-patterns-and-templates/
IEEE
" » Understanding Gutenberg Blocks, Patterns, and Templates." Geoff Graham | Sciencx [Online]. Available: https://www.scien.cx/2024/08/26/understanding-gutenberg-blocks-patterns-and-templates/. [Accessed: ]
rf:citation
» Understanding Gutenberg Blocks, Patterns, and Templates | Geoff Graham | Sciencx | https://www.scien.cx/2024/08/26/understanding-gutenberg-blocks-patterns-and-templates/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.