0

I am using Mobile Switch to switch to my mobile theme when viewed on a mobile device. However, I don't see any way of setting redirect to a custom front page. How can I do this?

1

Have you tried Context Mobile Switch in comination with Context? And if you want to implement a small custom module then you can add the global $conf variable and inspect it for which property to switch on.

2
  • Can you explain exactly how you would use the $conf variable here? I tried enabling the context mobile switch module and I didn't see any change... Aug 4 '14 at 19:11
  • Use context mobile switch with context module. In context UI create new context and add two conditions, 1. you are at the url of the front page of normal theme, 2. site is using mobile theme. Then add action to redirect to your mobile front page. To use $conf variable the easiest (not nice) is to add the php code filter to a body field, and very first statement you do something like this: global $conf; global $base_url; if (isset($conf['mobile_switch_mobile_theme_use']) && $conf['mobile_switch_mobile_theme_use'] == TRUE) drupal_goto($base_url . '/yourmobilefronturl'; ?>. Aug 5 '14 at 7:01

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.