Seems only enabled blocks have a weight, so I did it like this:
{% if drupal_entity('block', 'volcano_search_autocomplete')['#weight'] is defined %} ... {% endif %}
I'm currently printing a block in my region.html.twig using for example
{{ drupal_block('bartik_powered') }}
Can I somehow only show the block on pages for which it is enabled in the Block Layout page?
I tried
{% if drupal_block('bartik_powered') %}
{{ drupal_block('bartik_powered') }}
{% endif %}
But that if-condition seems to return TRUE for every page, not just for the 5-6 pages the block is enabled on.
Fixed
1.0
Miscellaneous
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Seems only enabled blocks have a weight, so I did it like this:
{% if drupal_entity('block', 'volcano_search_autocomplete')['#weight'] is defined %}
...
{% endif %}