Add Notification or Hook to Dynamically Filter Allowed Block Types in Block Grid Editor Based on Document Type or other condition #19456
Replies: 2 comments
-
I think this is a very good idea and would allow for some very friendly customization for editors. |
Beta Was this translation helpful? Give feedback.
-
This is a fantastic idea, adding new blocks is annoying - especially having to configure the setting and content elements each time. We often end up with several block grids per site - One for a curated homepage, one for "Standard" pages, and in many sites a 3rd one for special pages, perhaps articles, blog pages or something else that has special requirements. Having all of these be simply controlled by what kind of content is displaying the grid would be perfect. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, Umbraco allows filtering allowed child document types in the content tree via the SendingAllowedChildrenNotification. However, there's no equivalent mechanism for dynamically filtering allowed block types in the Block Grid Editor based on the current content node's document type.
This feature would allow developers to tailor the editing experience by restricting which blocks are available per document type, without duplicating Block Grid Data Types or enforcing restrictions only at save time.
🧩 Proposed Feature:
Introduce a new notification (e.g., SendingAllowedBlockGridElementsNotification) that is triggered when the Block Grid Editor is rendered. This notification would:
Provide access to the current content item or its document type.
Allow developers to dynamically filter or modify the list of allowed blocks based on custom logic.
🎯 Use Cases:
Document-Type-Specific Restrictions:
On a "Landing Page" we may want to allow only layout and hero blocks, while on an "Article Page" we may allow only text and media blocks.
Multi-Site Setup:
In a multi-site solution using shared document types and block types, different sites often require different sets of allowed blocks. A dynamic filtering mechanism would make it possible to reuse Block Grid configurations across sites while customizing the available blocks per site or section.
✅ Benefits:
Avoids duplication of Block Grid Data Types.
Enables more maintainable and scalable configurations for large or multi-site installations.
Aligns with existing extensibility patterns like SendingAllowedChildrenNotification.
Improves editor guidance and consistency.
Please consider this enhancement for a future release — it would significantly improve flexibility for advanced Umbraco implementations. Thank you for your excellent work!
Beta Was this translation helpful? Give feedback.
All reactions