Switcher links should be rendered after hook_block_view_alter

Created on 10 January 2013, over 12 years ago
Updated 2 May 2025, about 1 month ago

Right now, domain_block_view_switcher() returns a block renderable array, but the content is itself just pre-rendered #markup. One of our clients wants to be able to e.g. add domains to the switcher that are actually hosted outside of Drupal (some countries have opted into Drupal; others haven't!)

At any rate, it would be useful to be able to alter the list of domains (re-order them? disable some?) rather than rendering the markup too early. I think it's best practice to expose the contents of blocks to hooks like hook_block_view_alter() and hook_page_alter() if possible.

Will attach a patch for this in the first comment.

✨ Feature request
Status

Closed: outdated

Version

3.5

Component

User interface

Created by

πŸ‡¬πŸ‡§United Kingdom jp.stacey

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.71.5 2024