So there are a whole bunch of useful tools in Drupal for changing how a website looks depending on a number of factors, including which page you're on, what roles you have, whether you're logged in or not:
- Page Manager (part of Chaos Tools in Drupal 7), and the contexts provided within (found a freaking awesome tutorial on this stuff here)
- Domain Access and various others like it
- Organic Groups
But I can't seem to figure out how to make the following use case work:
Anonymous user visits site
a. If user has never been to the site before (on this browser/computer), ask whether they are A or B
b. If user has been to the site before, figure out whether they are A or B (should be easy enough with cookies/session variables)
Change how site looks depending on whether user is A or B
It's really easy once they log in, but how do I tell anonymous users apart?
I tried installing ctools cookie context and ctools session context in the hope that I could use these to provide the necessary hooks for visibility settings in page manager... but visibility settings don't seem to use contexts!
Surely somebody has tried to do this before me? Maybe I am googling the wrong words but I've been at this for several days without a clear idea yet.