I just installed the Sections module, and I am trying to create a separate look and feel for my Admin area. I enabled the module and enabled the two different themes I wanted to use in the Themes section. Then I went to the Sections section and made a section called Administration and set it to use the Chameleon theme. I checked "Show only the listed pages" and then in the textarea I put admin*

Not only does this not work, but everytime I go back to edit this Section, anything I write in the Pages: area disappears.

What am I doing wrong?

I am basically trying to get rid of this Admin interface on the regular website. I want the website and the admin to be separate. If anyone knows of any other betters way to do this, let me know. The ControlPanel module isn't available for version 6. I'm brand new to Drupal and none of this is making any sense to me!

Thanks in advance!

Comments

visionmark’s picture

After searching around for two hours while I waited for a response, I finally found that 6 has admin themes built in!

I'm still having problems with putting information into text fields and then they disappear. This happens in all modules.

hass’s picture

Priority: Normal » Minor

admin_theme is a core feature since D5. I don't know why this switching is not working for "admin"... maybe this is blocked by core and sections cannot overwrite the custom_theme variable at module stage. You could investigate why...

hass’s picture

Status: Active » Fixed

Ok, I think the order is:

1. Sections have weight -10
2. System module have weight 0
3. First of all sections get called and set's it's theme value
4. If Admin theme is configured it get's overridden in system_init().

function system_init() {
  // Use the administrative theme if the user is looking at a page in the admin/* path.
  if (arg(0) == 'admin' || (variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(1) == 'add' || arg(2) == 'edit'))) {
    global $custom_theme;
    $custom_theme = variable_get('admin_theme', '0');
    drupal_add_css(drupal_get_path('module', 'system') .'/admin.css', 'module');
  }

Solution:
1. One way to workaround this may be writing another sections_admin_theme_overrride module that have a weight of 1 and is only build for overrriding the administrative theme after system module have set it's value. I wouldn't do this strange idea!
2. Configure a sections that works like the above admin theme switcher for your admin and node edit pages.

I haven't tested the below, but the page filter for such a sections may be (make sure you do not configure an admin theme and do not enabled the "Use administration theme for content editing" checkbox):

admin
admin/*
node/add
node/*/edit

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.