[drupal-devel] Enable multiple block regions (not just "left" and
nedjo at gworks.ca
Fri Jul 29 04:31:44 UTC 2005
Drupal.org didn't seem to send this out (unless it's still out there
somewhere), so I'm reposting. Summary: This is a revised patch for
introducing multiple regions, responding to recent suggestions and
guidance. It preserves multiple themes and block admin overview page.
Thanks all for sticking with this patch. I'm hoping it's nearing
#113 submitted by nedjo on July 28, 2005 - 18:24
Attachment: regioning6.patch (33.87 KB)
Thanks for all the feedback and suggestions a few days back on multiple
themes and regioning.
The priorities I heard were:
* maintain multiple theme support
* keep a block overview admin page
* make block placement in different themes easier/more predictable
* if possible, open the way for an AJAX-based interactive regioning
solution, e.g., drag blocks to the regions they should be in
I've implemented a solution that, I'm thinking, pretty well meets these
priorities. Rather than moving region placement to the individual block
configuration page, I've implemented a distinct local task (admin page)
for each theme, so that each theme can have its own settings, not only
for block placement but also enabling and weight.
To implemement this, I've added a 'theme' field to the blocks table. The
trickiest part is ensuring that, when a theme is enabled, a default set
of blocks are added (as when, on drupal installation, two blocks from
the user module are enabled). I've introduced a
system_initialize_theme_blocks() function for this purpose.
I'm hoping that this patch iteration is nearing readiness to apply.
Please review and test if you are in a position to do so.
Screenshot to follow.
#114 submitted by nedjo on July 28, 2005 - 18:28
Attachment: theme_block_admin.png (15.89 KB)
Screenshot showing theme-specific block admin. There is a local task for
each enabled theme. Clicking on the theme's link loads a block admin
page rendered in that theme, with that theme's available regions
highlighted, and with that theme's available blocks as placement options.
More information about the drupal-devel