Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I love this module but it took me awhile to figure out how to provide an easy way for people to switch from iUi to my default theme and back. As is, once a user switches to this theme, they are pretty much locked in at this point. So what I did was use the following php snippet to create a page with the Switchtheme module block and then place that page as an item in my primary menu.
<?php
$block = module_invoke('switchtheme', 'block', 'view', 0);
print $block['content'];
?>
Now it works like magic and anyone can swiftly switch back and forth from iUi to the Default theme at will.
Thanks for the great module and I hope this tip helps someone out there.
Comments
Comment #1
drew reece CreditAttribution: drew reece commentedThis may help me out, thanks.
One issue I'm having is that switching themes doesn't account for the different url structures eg
mysite/events <- standard theme
mysite/#_events <- iui theme
So the user gets a broken page when changing to the mobile theme when not on the home page, Is this the normal behaviour?
Comment #2
BenK CreditAttribution: BenK commentedSubscribing...