modX.regClientCSS
Last updated Apr 6th, 2019 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$301 per month—let's make that $500!
Learn moremodX::regClientCSS¶
Register CSS to be injected inside the HEAD tag of a resource.
Syntax¶
API Doc: modX::regClientCSS()
void regClientCSS (string $src, [string $media = null])
-
$src
(string) The CSS to be injected before the closing HEAD tag in an HTML response. required -
$media
(string) Possible values are:all
,aural
,braille
,embossed
,handheld
,print
,projection
,screen
,tty
,tv
Example¶
Register a CSS file to the HEAD tag for all
'media':
$modx->regClientCSS('assets/css/style.css', 'all');
See Also¶
- modX
- modX.regClientHTMLBlock
- modX.regClientScript
- modX.regClientStartupHTMLBlock
- modX.regClientStartupScript
- modX.getRegisteredClientScripts
- modX.getRegisteredClientStartupScripts
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$301 per month—let's make that $500!
Learn more