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?

2
  • are you an Admin when this happens? or does it happen for all authenticated users Commented Jul 17, 2014 at 14:40
  • This is happening for all authenticated users.. Commented Jul 18, 2014 at 6:26

1 Answer 1

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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.