I use a modx document as my CSS file and then use getResourceField to grab the TV. See the call below.
background: url([[++site_url]]assets/endusers/[[!getResourceField? &id=`1` &field=`headerImage` &processTV=`1`]]) [[!getResourceField? &id=`1` &field=`horizontalPosition` &processTV=`1`]] [[!getResourceField? &id=`1` &field=`verticalPosition` &processTV=`1`]];
I tend to put all of my CSS entries into a single file, but yes, you could use two.
Two files actually it's a little bit stupid, but.. I like editing css over ftp, it's much comfortable for me.
Anyway it's the only way to do such a thing? I was wondering maybe exist some code, syntax or snippet fo use it directly in css file. You know like opening style.css over ftp, and just entering the similar thing "body {background-color:[*body-color*]}" directly into css file, but i think where are no solution for that?
I think it is possible to access some of the modx elements from external files, but not sure that it's possible to execute snippets externally.
You can keep the css in a file and use a snippet to inject it into the head of the document with:
$modx->regClientCSS('url/of/css/file');
http://rtfm.modx.com/display/Evo1/regClientCSS
---------------------------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
MODx info for everyone:
http://bobsguides.com/MODx.html