Created
May 10, 2012 12:20
-
-
Save betweenbrain/2652727 to your computer and use it in GitHub Desktop.
How to add assets to a Joomla template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$doc = JFactory::getDocument(); | |
$doc->addStyleSheet('templates/' . $this->template . '/css/screen.css','text/css','screen'); | |
$doc->addCustomTag('<meta name="author" content="Matt Thomas, matt@betweenbrain.com" />'); | |
$doc->addFavicon('templates/' . $this->template . '/favicon.png','image/png','shortcut icon'); | |
$doc->addScript('https://raw.github.com/LeaVerou/prefixfree/master/prefixfree.min.js'); | |
$doc->addStyleSheet('http://fonts.googleapis.com/css?family=ubuntu'); | |
$doc->addStyleDeclaration(' body {font-family: "Ubuntu", serif;}'); | |
$doc->addCustomTag('<!--[if lt IE 9]>'); | |
$doc->addCustomTag('<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>'); | |
$doc->addCustomTag('<![endif]-->'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment