Jump to main content Jump to doc navigation


Register CSS to be injected inside the HEAD tag of a resource.


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


Register a CSS file to the HEAD tag for all 'media':

$modx->regClientCSS('assets/css/style.css', 'all');

See Also