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

Created on 14 December 2015, over 8 years ago
Updated 19 February 2024, 3 months ago

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.

πŸ“Œ Task
Status

Needs work

Version

11.0 πŸ”₯

Component
BlockΒ  β†’

Last updated 4 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States Dane Powell

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024