Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
I try to offer anonymous users a button to select a different theme for accessibility reasons. Different colors or high contrast.
Preferably the URL stay's the same. Like in http://www.nlbb.nl/ where you can select colors in the top menu.
I just can't find a good solution.
- Switchtheme offers the functionality. But that module does not perform well
- CSS-injector will do, but I can't see how the configure that module to this required functionality.
- And also the Themekey module, I can't find a way to implement the functionality.
Can anyone get me moving?
Comments
Comment #1
ecvandenberg CreditAttribution: ecvandenberg commented...not the first time I find the solution just AFTER posting an issue :-0
Themekey can do this with the option Retain the theme until a new theme is set for anonymous users enabled.
Then create a rule with system:query_param. As an example system:query_param = display=blackwhite
Then make a block with an hyperlinks to ?display=blackwhite
Anonymous users can now click the link and switch from theme while staying on the same page.
Works like a charm. Thanks for this nice module.
Comment #2
ecvandenberg CreditAttribution: ecvandenberg commentedComment #3
mkalkbrennerYou're welcome :-)
Comment #4
XorunaThanks for explanations ecvandenberg it helped me too :)