Community & Support

Administration theme not on every page

Hi!

My theme is quite different from the default ones and since I haven't skinned the admin part of it yet (not sure if I ever will, either) I'm using Garland as administration theme. However, when I'm on the "Administer Blocks" page or any of the "Create Content" pages, the theme reverts to my custom one and all the form controls look horrible. Is there a way around this?

Comments

Having same problem

I'm having a similar problem with the blocks admin page except my theme is completely dropped, no style whatsoever. Same thing happens after enabling/disabling modules.

Here is my original post http://drupal.org/node/111467

check out node/100757

i posted an issue about this some time back. You might glean something from it - http://drupal.org/node/100757

Cheers,
c.

Thanks

That helped some. Looks like there are a fiew problems with the admin theme but no one wants to look at it. Not sure what I'm gonna do at this point.

Seems like Im just missing some new themeing function or something. The page loads, but there is no css links and no style, I took a screenshot of what im talking about below:
http://picasaweb.google.com/eric.mckenna/Drupal/photo#5023352528005646786

fix in block.module

I found a quick fix for Block administration in block.module (go figure). Just comment out the following lines (213-218) like so:

  // if ($theme) {
    // $custom_theme = $theme;
  // }
  // else {
    // $custom_theme = variable_get('theme_default', 'garland');
  // }

Hope that helps. I'm sure there's a similar fix in node.module for Create Content, I just haven't tracked it down yet.

Solved

Add code below in your whatever module. I put in the block module, but it probably should be in a separate module. If you want to have block as well you add that in if statement.

<?php
 
if ((arg(0) == 'node' && arg(1) == 'add') ||  (arg(0) == 'node' && arg(2) == 'edit') ||  (arg(0) == 'user' && arg(2) == 'edit') ) {
      global
$custom_theme;
     
$custom_theme = variable_get('admin_theme', '0');
     
drupal_add_css(drupal_get_path('module', 'system') .'/admin.css', 'module');
  }
?>

The original post

http://drupal.org/node/122578