I think your first reply was closest to what I want, but I just don’t know ruby very well or how to implement it using erb templates. Basically right now I have 7 partials and the only difference is their color. I want to make it one partial and then say in a variable on the page I call the partial, say I want blue. I set the variable ‘color: blue’. Which then either sends the blue data file or the blue data part of the color data file into the partial to be used. I’m basically running into the problem that I have to adapt this for multiple partials that all have this variation but some use more of the blue color data and so say
- color: blue
background: FFFFFF
foreground: 000000
text: 000004
or if the file was it’s own color file blue.yml inside the data/color folder
- background: FFFFFF
foreground: 000000
text: 000004
so that’s the blue color object but foreground doesn’t exist in say template 05 but exists in template 04. I don’t want to make several color templates for each specific purpose. I could do it through css classes, but I would end up making hundreds of classes. Ideally I could do it without a do, end loop as well because that adds complications to it and I’m adapting middleman for a purpose that is a bit unorthodox. Hopefully this clears things up on what I want to do!