pattern-lab / patternlab-php-core

This repository provides the core functionality for Pattern Lab. It is meant to be used from within an Edition with a PatternEngine and StarterKit.
http://patternlab.io/
MIT License
43 stars 62 forks source link

Add a dropdown selector for extra context parameter #168

Open simesy opened 6 years ago

simesy commented 6 years ago

Hope I'm asking in the right place, I've been looking at the patternlab setup for our drupal integration, but haven't really worked out where this should be done properly.

I want a drop down selector in the main menu (ie next to "Disco" or wherever). I want to populate this with some values.

When the user changes the value, I want to persist the value either as a $_GET in the url, or as a cookie.

The rest I can do easily enough with javascript (eg swap in a stylesheet based on that value) but any other tricks are welcome.