Skip to content

Conversation

@porstendorfer
Copy link
Contributor

Changes proposed in this pull request:

Open questions:

  1. Naming: Currently using "Global Block Groups" - open to suggestions for a clearer/better name
  2. Implementation approach: Currently using snippets for rendering (called from both the default layout and the page builder block that allows selecting a block group) - should we consider a custom tag instead?
  3. Page Type enhancement: Would it be valuable to extend this system to allow setting "Page Types" (e.g., "Product Pages", "Blog Posts") and select pages via those types in addition to individual page selection?

The current implementation provides both automatic placement with visibility controls and manual placement options.

Additional context:
For some of our clients, we've created dedicated block groups for different collection types (e.g., product pages, blog posts) by hardcoding specific groups in the respective collection layout views. This allows clients to easily edit collection-specific content themselves without needing to understand complex visibility rules. This approach could be formalized through the Page Type enhancement mentioned above.

Looking forward to feedback on these design decisions!

@porstendorfer porstendorfer marked this pull request as draft September 4, 2025 09:47
@robdekort
Copy link
Contributor

robdekort commented Sep 4, 2025

Paul, this is really great!

A few things I noticed, and to answer your questions:

  • I think this should go into the layouts folder instead of snippets.
  • I'm good with it not being a tag. But if you'd prefer a tag, please go ahead. Since this preset already introduces a new fieldtype: why not :-).
  • Page type enhancements: I can see the value in that, but this is already really great.
  • For variables in antlers I prefer using an _ instead of a $. Although both serve the same goal, I believe I've used _ in other presets as well.
  • The block in the page builder needs an icon. layers-filled doesn't seem to exist in the default set.
  • The global could use a section title and possibly a description like other globals in Peak do.
  • Naming: yeah, this is a tricky one. Block groups does not really do it justice. I'll give this some thought

Hope this helps for now. Again: awesome!

@robdekort
Copy link
Contributor

Regarding naming, I see why it's called block groups, but I'd guess it would mostly be used to set default blocks. What about Default blocks?

@porstendorfer porstendorfer marked this pull request as ready for review September 7, 2025 10:07
@porstendorfer
Copy link
Contributor Author

@robdekort Thanks for the great feedback! I've updated everything accordingly.

I decided to keep it in antlers rather than creating a custom tag. While a tag would be nice, I feel it might be unnecessarily complex for users who want to enhance or customize the system themselves. Maybe something to consider in the future if this system gets extended further.

Thanks again for the positive feedback and helpful suggestions!

@robdekort robdekort merged commit bc0a5c2 into studio1902:main Sep 8, 2025
@robdekort
Copy link
Contributor

Thanks, Paul. I'll merge and tag a release soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants