Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is part of #2025629: [meta] Ensure that all #theme/#theme_wrappers hooks provided by core are associated with a sensible, re-usable element #type.
Work towards this has started at #2072647: #theme 'maintenance_page' should support render arrays in #content by @jwilson3.
This makes sense to me, I don't know of any reason to special-case the structure of render arrays for maintenance pages.
Comments
Comment #1
jwilson3Closing duplicate per #2072647-22: #theme 'maintenance_page' should support render arrays in #content.
Comment #2
jwilson3Comment #3
jwilson3Actually, i guess it makes sense to leave this open, since we could refactor this to introduce the regions inside the $variables['page']['regionname'] (which is where the major difference will lie after #2072647 gets in.
Comment #4
thedavidmeister CreditAttribution: thedavidmeister commentedI was actually thinking (assuming it is technically feasible) that the current '#theme' => 'maintenance_page' would become:
And then we leverage template_preprocess_page() instead of duplicating that logic inside template_preprocess_maintenance_page().
I have a feeling there's some good reason we can't do this though, or it probably would have already been done at some point.
Comment #5
lauriiiIt would be cool to figure out way to do this still in Drupal 8.