Skip to content

Instantly share code, notes, and snippets.

@iamrobert
Last active July 23, 2018 16:59
Show Gist options
  • Select an option

  • Save iamrobert/0a96b899a5fcc0306a18ffeebef517af to your computer and use it in GitHub Desktop.

Select an option

Save iamrobert/0a96b899a5fcc0306a18ffeebef517af to your computer and use it in GitHub Desktop.
Joomla Template Calls
//JOOMLA TEMPLATE INLINE CSS
$document = JFactory::getDocument();
$siteURL='http'.(empty($_SERVER['HTTPS'])?'':'s').'://'.$_SERVER['SERVER_NAME'];
$inlineStyle= file_get_contents ($siteURL.$tpath.'/css/fonts.css');
$document->addStyleDeclaration($inlineStyle);
//JOOMLA TEMPLATE INLINE JS
$siteURL='http'.(empty($_SERVER['HTTPS'])?'':'s').'://'.$_SERVER['SERVER_NAME'];
$inlineJs= file_get_contents($siteURL.$tpath.'/js/b-lazy.js');
echo '<script>'.$inlineJs.'</script>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment