You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of today, if a section is using theme blocks, the only thing we can do is rendering them. However, it is not possible to access the settings of theme blocks nor their types:
This is problematic for complex sections. For instance, we have sections that must have some CSS properties defined based on a max value of children blocks. There are cases where we don't really care about the order, but more about the content itself.
The current limitation where theme blocks can only be rendered with {% content_for %} is way too limited. We should be able to inspect them and render a block in unit:
{% for block in section.blocks %}
{% if block.type == '@theme/foo' %}
{% render block %}
{% endif %}
{% endfor %}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
As of today, if a section is using theme blocks, the only thing we can do is rendering them. However, it is not possible to access the settings of theme blocks nor their types:
This is problematic for complex sections. For instance, we have sections that must have some CSS properties defined based on a max value of children blocks. There are cases where we don't really care about the order, but more about the content itself.
The current limitation where theme blocks can only be rendered with
{% content_for %}is way too limited. We should be able to inspect them and render a block in unit:Beta Was this translation helpful? Give feedback.
All reactions