Open moacode opened 5 years ago
Is this going to be reviewed and implemented @samhibberd ?? This is a must have feature.
Yes absolutely @michtio, field presets / settings might be getting a little restructure which needs to be considered carefully to ensure backwards compatibility, we will implement either way.
Thanks for the pr @thejoshsmith.
Use Case
I wanted to be able to set field specific settings per site. I.e., it'd be great to create a bunch of presets (e.g. themes for each site), and toggle that preset on the same field.
What I did
Craft doesn't support multi-site field settings out of the box. The simplest approach I could think of was to simply store the site specific settings in an array key called "siteSettings", and direct Craft to load those ones when required, otherwise falling back to the default settings.
I added a toggle so users can choose whether their color settings will be propagated across all sites, or specific to each site.
I also removed the translation field, as I don't think it's relevant for this field type? (Correct me if I'm wrong!).
How to test
colorit
field and assign to a section(Note: I tested mine inside a matrix).