Download & Extend

How can the theme be made persistent?

Project:Switchtheme
Version:7.x-1.0
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I am using SwitchTheme via a URL parameter, like so:
mywebsite.com/?theme=mytheme

But once you get into the site and start doing stuff, eventually you click URL links that no longer contain "?theme=mytheme" and those pages load with the regular default theme, not mytheme.

How can I make it so "?theme=mytheme" stays in the URL when someone enters my website and does things in it?

Comments

#1

Hi Cablestein, did you figure this out?

#2

For anyone else looking for the solution - all you need to do is make use of drupal l() function (for your links) and check the permissions.

#3

Version:7.x-1.x-dev» 7.x-1.0

Doesn't seem to work in IE and Firefox, works fine in other browsers though.

#4

Status:active» needs review

You don't need to keep ?theme= in the url. The theme should (and does on my end) stay persistent.

I'm using the master version. There may be changes from the 7.x-1.0. Perhaps there will be a 1.1 version soon.

#5

It does for me too, but users that aren't logged in don't get to keep the theme past the page the link is on (in firefox and IE).

#6

I don't have IE so I cannot verify that one. But Firefox (and Chrome) works just fine for me as an anonymous user. I switch the theme with ?theme= and then continue surfing the site with no further changes in the theme.

Are you testing on a fresh install?
Are you using the master version? (This is the one changes will be made to)

#7

Yes, it is a fresh install, but I'm not sure I know what you mean by "master version" (I'm using version 7.x-1.0).

#8

The master version is the main version of the module. You can clone it with Git but not download it from the website.

I downloaded the 7.x-1.0 version and it still seems to work just fine on my end. I am just trying to help, but I just cannot replicate your bug. On my system I change the theme via the GET command and it stays changed no matter what link is clicked. No links contain theme=.

#9

I am using SwitchTheme via a URL parameter, like so: mywebsite.com/?theme=mytheme
I need to use this parameter because I'm using this module with the "link field" module.

#10

GET is when we pass parameters in the URL.

Perhaps there is a conflict with your other module. Have you tried disabling it and manually typing in yoursite.com/?theme=THEME. ? And then clicking different links on your site?

#11

Yes, I've deactivated all my modules and then tried to manualy type in ?theme=bartik and it worked until I go to another page.

#12

I've installed the themekey module and I'm now using this instead. (turns out that I couldn't fix the problem)

#13

Status:needs review» active
nobody click here