- Issue created by @pdureau
- 🇩🇪Germany Christian.wiedemann
From my point of view I think it is deprecated but we should compatible with existing stuff. The theme layer should render a empty twig template.
We need a final discussion about those wrappers and a strong and bold policy about them.
block.html.twig
We are directly rendering BlockPluginInterface::build() instead of the "#theme" => "block"
wrapper.
So, we are skipping block.html.twig
template and rendering directly the content
variable:
<div{{ attributes }}>
{{ title_prefix }}
{% if label %}
<h2{{ title_attributes }}>{{ label }}</h2>
{% endif %}
{{ title_suffix }}
{% block content %}
{{ content }}
{% endblock %}
</div>
This was a good decision IMHO because:
hook_preprocess_block
because we also loading directly the plugin form and not triggering hook_block_form_block_form_alter
. hook_preprocess_block
and hook_block_form_block_form_alter
) will not be compatible, but that's OK.However:
label
and label_display
properties which are related to the wrapper?"#theme" => "block"
wrapper? Let's have a last talkfield.html.twig
)We already talk about that: 📌 [2.0.0-beta5] Check hook_field_formatter_third_party_settings_form compatibility Active but I am not sure we did the epxected follow-up issue and we ended the discussion.
Do we currently trigger "#theme" => "field"
?
We need to adopt here the exact same policy than for blocks:
field.html.twig
because we think it is an outdated annoying layer which must die, we may miss compatibility with some modules. (and we need to be sure we are not triggering hook_field_formatter_third_party_settings_form
either.hook_field_formatter_third_party_settings_form
and hook_preprocess_field
Active
2.0
Code
From my point of view I think it is deprecated but we should compatible with existing stuff. The theme layer should render a empty twig template.