Drupal administration theme doesn't apply to Blocks pages (admin/build/block)

Posted by hfidgen on Stack Overflow See other posts from Stack Overflow or by hfidgen
Published on 2009-09-08T11:27:08Z Indexed on 2010/05/07 9:18 UTC
Read the original article Hit count: 273

Filed under:
|

A site I'm creating for a customer in D6 has various images overlaying parts of the main content area. It looks very pretty and they have to be there for the general effect.

The problem is, if you use this theme in the administration pages, the images get in the way of everything.

My solution was to create a custom admin theme, based on the default one, which has these image areas disabled in the output template files - page.tpl.php

The problem is that when you try and edit the blocks page, it uses the default theme and half the blocks admin settings are unclickable behind the images. I KNOW this is by design in Drupal, but it's annoying the hell out of me and is edging towards "bug" rather than "feature" in my mind. It also appears that there is no way of getting around it.

You can edit /modules/blocks/block.admin.inc to force Drupal to show the blocks page in the chosen admin theme. BUT whichever changes you then make will not be transferred to the default theme, as Drupal treats each theme separately and each theme can have different block layouts. :x

function block_admin_display($theme = NULL) {
  global $custom_theme;

  // If non-default theme configuration has been selected, set the custom theme.
  // $custom_theme = isset($theme) ? $theme : variable_get('theme_default', 'garland');
  // Display admin theme
  $custom_theme = variable_get('admin_theme', '0');

  // Fetch and sort blocks
  $blocks = _block_rehash();
  usort($blocks, '_block_compare');

  return drupal_get_form('block_admin_display_form', $blocks, $theme);
}

Can anyone help? the only thing I can think of is to push the $content area well below the areas where the image appear and use blocks only for content display.

Thanks!

© Stack Overflow or respective owner

Related posts about drupal

Related posts about drupal-6