Skip to content

Instantly share code, notes, and snippets.

@2dpi
Created June 16, 2015 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 2dpi/b7969592177bfaca51e4 to your computer and use it in GitHub Desktop.
Save 2dpi/b7969592177bfaca51e4 to your computer and use it in GitHub Desktop.
JOOMLA - Add Style Declaration
<?php if (!empty($attribs->select_banner_image)) {
$style = 'html {
background-image: url('.$attribs->select_banner_image.') !important;
background-size: contain;
background-repeat: no-repeat;
background-position: center top;
}';
$doc->addStyleDeclaration( $style );
} ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment