Hi,
i've just discover clientConfig, and i would like to allow my clients to change colors (as there is a color picker), but the colors are in the css, so i put my css as document, and try to replace the color code by the clientConfig key, but it don't work :-(
so i suppose it's like TV, we cannot add them inside css
so what is the best way to do that, copy this css rules in the head ? or there's a better way ?
-
☆ A M B ☆
- 24,524 Posts
How are you using the tags? Can you post a sample line of CSS in your .css resource?
here it is:
.spacer {
display: block;
width: 80px;
height: 3px;
margin: 15px auto 25px;
background-color: [[++spacer_color]];
}
and i have spacer_color as key in client config
my resource css, works, i have tested it
-
☆ A M B ☆
- 24,524 Posts
Try it uncached - [[!++spacer_color]]
I would suggest, call everything cached [[....]] , at first place.
This will cache the result at the first page-visit.
Only, if you have parts, which will change from request to request, for example request-parameter-dependent output or randomized output, call this part uncached [[!...]]
Its possible to create also request-parameter-dependent cached versions of element-output, for example with the getCache - snippet.