Here's a quick snippet that solves that problem. Just insert
[[register_css?file=`/assets/css/foo.css`]]
in your template, page, or chunk, and create a snippet with this code:
if ($file) {
$modx->regClientCSS("<link rel='stylesheet' type='text/css' href='$file'></link>");
}
?>
No comments:
Post a Comment