hey folks,
I was wondering if it’s possible to address tv’s in css files.
say, I’ve got a tv named "test" (text) with the value 100. Well, in HTML docs I get "100" with [*test*]; But in CSS, f.e. "width: [*test*]px;" does not work.
How can I archive that?
My content should be separated in 4 div’s, and they need to change width and background image on every main menu point ...
Hope you can get me!
Thanks a lot,
Simon
-
MODX Staff
- 2,502 Posts
I’ve not tried this but I would think that in order to use a TV in a CSS file that the CSS file would have to be a MODx document and be called in your template head so that it would be parsed by the MODx parser.
Traditionally if you include a link to the css file in the head of your template the CSS isn’t parsed because it is fetched by the HTML ouptut by MODx. If you have it as a MODx document you will be grabbing it via MODx and therefore all tvs, and other MODx tags will be parsed and then output to the browser.
Hope this helps.
Jay
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
-
MODX Staff
- 2,502 Posts
Well, that will work
1000 ways to do just about anything in MODx.
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub