0

I am using two themes for my web and mobile site. And I'm using the ThemeKey module.

No matter what I try, the user edit page is always shown as in the theme of my web site and not my mobile site.

The following code doesn't work.

function mytheme_theme() {
  $items = array();
   $items['edit_profile_user_profile_form'] = array( 
     'render element' => 'form',  
     'template' => 'templates/user-profile'
   );

   return $items;
}

This only lets me theme the user profile page in user-profile.tpl.php. Also page--user--edit.tpl.php does not work.

How should I achieve this?

  • are you an Admin when this happens? or does it happen for all authenticated users – Geoff Jul 17 '14 at 14:40
  • This is happening for all authenticated users.. – mjs Jul 18 '14 at 6:26
1

I found the solution for this.

The reason for error was that the ThemeKey module was not overriding and admin pages, by default. Hence pages like user/uid/edit which are admin by nature are not overriden in their theme and pick the admin appearance theme always.

To bypass this I enabled the THEMEKEY COMPATABILITY Module (Part of Themekey module for D7). Open the following settings page:

http://localhost/admin/config/user-interface/themekey/settings/compat

Section Modules>> Integrate Modules in Theme Switching Rule Chain>>

Then check the option "System (Administration theme)".

Now all admin pages like user/uid/edit also come under theme switching rule and pick the theme as defined.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.