Jump to main content Jump to doc navigation

modX::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