D
D
Dmitry Kamyannoy2015-07-04 12:27:05
Drupal
Dmitry Kamyannoy, 2015-07-04 12:27:05

How to organize a theme change button for any user?

Good afternoon uv. Guru.
There is a site with a mobile version of the template, organized by the mobile_theme and browscap module. (roughly speaking, the mobile version of the only template that works automatically when you log in from your phone or tablet) and the question became how to figure out the button to switch to the main theme if the user does not like it.
I tried the Stheme switcher module, but giving the user rights to the block learned something so that when choosing a theme, the theme changes globally, and the requirement is individual. Please tell me if there are any features / modules for individual switching. Thank you very much =)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir Shiklgruber, 2015-07-04
@aaadddminnn

when clicked, write a cookie to the user. And then stupidly check if there is a cookie. If there is, then load another style, if not, then everything is as usual

U
UksusoFF, 2015-07-04
@UksusoFF

In ThemeKey , you can definitely do it personally.

T
Tlito, 2015-07-08
@tlito

you need to set the cookie parameter on button click.
in mobile_theme you need to somehow edit the code or write your own hook that adds a function - checking this cookie. or use mobile detect to select a theme and there it will be easier to check this cookie setting. but I don't know how to call the theme in it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question