By gábor hojtsy on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Introduced in version:
8.0
Issue links:
Description:
In Drupal 7 it was possible to specify separate block templates per region, such as block--header.tpl.php and block--footer.php to output different HTML for blocks placed in the header and footer regions. It was also possible to adjust variables based on region in hook_preprocess_block(). Both of these features have been removed.
It is suggested you use standard CSS cascading selectors to style blocks differently on different parts of the page.
Impacts:
Themers
Comments
I have a problem with this...
If I use CSS to hide #sidebar, in whatever theme, a wide blank block is created instead; The sidebar region keeps staying, but just as an empty and blank "box".
@Benia
I don't know if you found the answer already but maybe try this in your page.html.twig:
Maybe add an if statement and hide the sidebar using a preprocess function.
How to make a theme hook
How to make a theme hook suggestion for blocks according to region?