I have an Administration Theme I use for the site admin tasks, it's much cleaner.. and my normal site isn't designed for administration tasks

However, every time I go to administer blocks, the theme changes from the Administration Theme, to the default site theme.. why? And how can I fix this?

Thanks!

Comments

motivez’s picture

Anyone? I'm currently unable to really administer blocks because of this bug

motivez’s picture

bump

aasiutin’s picture

In your settings.php file you should write the next code:

if (strpos($_GET['q'], 'admin') === 0) {    
$conf['theme_default'] = variable_get('admin_theme','garland');
}
bartezz’s picture

Thanx for sharing, will try that!

________________
Live fast die young

bartezz’s picture

Doesn't work for blocks!

________________
Live fast die young

cpugeniusmv’s picture

I think the reason for that is so that you can immediately view the layout of your blocks as you are rearranging them from that page. I don't know of any easy way to change that behavior.

silverwing’s picture

That is the anticipated behavior because when you go to modify the blocks the system assumes you're modifying the blocks on the default public theme. This way, you can see what blocks you have and where they are. And since this is the only administration page that does this, it usually isn't a problem for most people.

~silverwing

_____________________________________________
Land of Midnight | MisguidedThoughts | showcaseCMS

motivez’s picture

I mean, I want to modify the blocks for the default, public theme, but I don't want to have to look at that theme while I'm administering blocks, that seems to be the whole point of an "Administration" theme to me?

Is there any way to get around this?

vm’s picture

no, the idea of this is so that you can see the theme that you are trying to adjust blocks in, which seems to make perfect sense.

Example, some people may not be using an admin theme with a right or left sidebar. That said, the admin theme would hide those blocks if this theme were used in the path you want.

_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

silverwing’s picture

I mean, I want to modify the blocks for the default, public theme, but I don't want to have to look at that theme while I'm administering blocks, that seems to be the whole point of an "Administration" theme to me?

You only have to look at that theme while administering the blocks. So you know where the regions are. That's the only time you'll see the default theme in the admin section.

This is all done on purpose.

Seriously, it's one page. And unless all you do in your admin section is change blocks, I don't see the problem.

~silverwing

_____________________________________________
Land of Midnight | MisguidedThoughts | showcaseCMS

motivez’s picture

That's the problem though. Because of the width (and other design elements) of my public theme, I'm unable to see the entire Administer blocks section, it's blocked by other areas of the page.. the buttons don't show up, etc

That's why I wanted a different theme for Administration tasks.

If I want to see how a block change looks on the live page, I can go view the live page after I've made a change, it's not that difficult

bartezz’s picture

Agreed! This needs a fix!

________________
Live fast die young

hollybeary’s picture

I had this problem recently and found a work-around that might help you. In your normal site theme you can create an admin template - page-admin.tpl.php
What I did next was copy the page.tpl.php from a default theme (I used Garland I think) and pasted it into my new page-admin.tpl.php theme. I also copied the style.css file from the stock Garland theme and created a new file called admin.css in my normal site theme folder. Make sure your page-admin.tpl.php calls to this stylesheet.
Then when you go to admin->site configuration->administration theme I could set the admin theme to my normal site theme.
This fixed the issues I was having, hope it helps you!

bartezz’s picture

Hi Hollybeary,

I've tried your solution and it doesn't work for me.
Problem is that my page.tpl.php has different regions set than the original garland page.tpl.php now used as page-admin.tpl.php.
This results in a very messy page!

The underlaying problem is that Drupal is crap at setting a special theme for the administrator! Pardon my French, but it is!
The way Drupal now works is combining the backend with the frontend... works great if you build one theme for both ends but who does that?

It would be nice to build one admin theme you can use in all your websites and a site specific theme for the front.
If you log in as admin you should get the admin theme... ALWAYS! And not switch back to front end theme upon save or when changing a block!

Most websites, well at least the ones I've made in the past, have such a layout that there is no space to fit all the back end features, menus, forms etc!

Anyway... that's just my 5 cents...

Cheers

________________
Live fast die young

WorldFallz’s picture

wow--- a single page doesn't function the way you want it to function for your particular use case (it's not broken, it's working precisely as designed) and that equates to "Drupal is crap at setting a special theme for the administrator"?? That hardly seems accurate or fair and just so you know, those kind of sweeping generalizations and baseless criticisms aren't likely to garner you much support in the forums. And as usual, it's comes from someone who's tracker demonstrates not even 1 minuscule contribution back to the community.

As for the way the block page works, I agree it's not always optimal. However, your preference is also incorrect-- there are valid use cases for both methods, therefore it should be presented as an option. If it's that important to you, instead of posting "me too" complaints, I would suggest a more constructive approach would be for you to check the issues queue for an existing issue and if none, file a new one.

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

bartezz’s picture

I appologize if my comment was too harsh! I should have used a different word setting... I'm just so frustrated after viewing hours of screencasts and reading tons of articles both online as in Drupal books that I can't seem to accomplish something which Drupal should be able to support with it's eyes closed, I know it's probably me... just got frustrated!

Yet, I must say that it's not very logical to me that if a systems gives you the option to set a different theme for an admin it only uses this setting partly.

I indeed have not contributed back to the community... yet! But I don't think I should start answering questions in forums if I'm not sure if I'll give the correct answer. I have however spoken to quicksketch of webform about contributing my solution to the problem I encountered there...

Pardon my French.... once again!

________________
Live fast die young

teebo’s picture

Hi everyone,

I am having and has have this same problem.
My public templates and admin templates are very different and not being able to change the order of blocks is annoying to my customers and to myself.

The "only" work around I have found was to go to admin > settings > admin theme and to choose the public theme just to change the blocks. But the result is most of the time quite sloppy. And it means that my customers have to swap from public to admin theme each time.
It hard to sell the merits of the "perfect" CMS (that's how I sell it at least) and than have this kind of bug.

This is definitively a CORE bug. And not SIMPLY Bartezz's "particular use case".

PLEASE FIX.

WorldFallz’s picture

1) When something is functioning as intended/designed it is not a bug no matter how many individuals may think so.

2) I'm not sure who that "PLEASE FIX" is directed at, but no one here works for you. You're not likely to be very successful in open source with that attitude.

3) For someone who's been a member for over 1.5 years you're tracker demonstrates exactly 0 basis for requesting anything... and, what's more, you should know better than to shout orders in the forums.

hollybeary’s picture

you could always just add the regions you need in the page-admin.tpl.php. That's the beauty of Drupal, you can fully customize every aspect of it to meet your individual needs. If the Garland theme doesn't have the same regions as your other theme, just change them.

samwich’s picture

Or you could target your admin/build/block page with CSS and change the widths of your content areas to make them wider just for one page to accommodate the block configuration.