Hey guys I have a chunk that contains all the stuff that goes in the <head> tag such as .js and .css files that are needed across the site. However I have 1 page, my contact page that needs additional .js files and .css files and I don’t want to put them in with the rest of the stuff that is used on the entire site because i want to limit the http requests.
So what options do I have to stay faithful with the modx templating system? Thanks.
2.2.4 Revolution
You could just use a different template for that page, or you could add a snippet to that page with something like the following (one line for each file you need injected into the <head> section):
<?php
$modx->regClientCSS('path/to/css/file');
$modx->regClientStartupScript('path/to/js/file');
The code you provided (after being modified for my filepaths) worked perfectly for what I needed it for. Thanks a bunch.
2.2.4 Revolution
Glad it worked. Thanks for reporting back.
I use a TV [[*extraCSSJS]] and use it for page specific css and js.
Quote from: BobRay at Dec 02, 2010, 01:16 AM
Glad it worked. Thanks for reporting back. 
If MODx ever goes IPO, I vote for Bob to get the first couple million!
Dave