Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292633

block_theme_initialize() falls back to putting blocks in the first region it finds, provide a better default

$
0
0

Currently, system_default_region() simply returns the first region in the list of regions. This isn't great, because the first displayed region is usually something like 'header', which in general is not a good default.

Proposed resolution

Fall back to the content region if there is one, and only after that fall back to the first region found.

Potentially improve this logic more generally, by allowing themes to specify roles/hints for their regions, in #3278410: block_theme_initialize() sledgehammers square blocks into round regions, allow themes to provide a mapping of regions to 'roles'.

A previous solution was to allow themes to specify their default region, but this is likely to be 'content' in most cases, so doesn't necessarily offer a lot more than improving the fallback logic without configuration.


Viewing all articles
Browse latest Browse all 292633

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>