Theme blocks optimisations
1. Not able to not render the theme block element when no blocks are added. I'd like to check e.g. {{ block.size }} or something like this to be able to ditch the render of the block (e.g. groups) to avoid dom rendering.
2. Not able to limit the amount of blocks that can be added. Add support for something like "max_blocks" or "limit" to prevent to much blocks.
Checklist
- [x] I have checked and made sure that the proposal adheres to this plugin's principles
Additional context Theme blocks are super powerful and really pleasant to work with, but it would be even better if is could a bit more flexible.
Hey @stijns96!
I believe these changes you're suggesting to the theme platform itself.
I'm not sure that this is the best place to get the relevant eyes on this suggestion, but I'm going to assign this to myself and keep this issue open so that I can make sure to follow up next week to figure out where the best place to raise these issues is.
This is a great suggestion! Thanks :)
Hi @jamesmengo ,
Thanks!
It happens quite some time that I'm not 100% sure where to open these kind of issues...
Luckely you guys are helpfull and a follow up would be much appreciated 🙂
Hey @stijns96 👋
For the first issue, {{ section.blocks.size }} is likely what you are looking for.
For the second one, can you provide a bit more context in terms of what you are trying to achieve? I'm trying to understand if it is similar to the request we have here.
Hi @mdamjanic7,
{{ section.blocks.size }} is only available on section level. I'm talking about nested private theme blocks.
For my second point you're mentioned the exact functionality that I want to use :)