Skip to content

Instantly share code, notes, and snippets.

@proweb
Created December 10, 2011 17: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 proweb/1455725 to your computer and use it in GitHub Desktop.
Save proweb/1455725 to your computer and use it in GitHub Desktop.
Правильное (последовательное) подключение мета-тегов, CSS и JS.
<?php
defined('_JEXEC') or die;
/* The following line loads the MooTools JavaScript Library */
JHTML::_('behavior.mootools');
/* The following line gets the application object for things like displaying the site name */
$app = JFactory::getApplication();
/* Get the document object */
$document = JFactory::getDocument();
/* First add CSS to the document */
$document->addStyleSheet('templates/system/css/system.css');
/* Then add JS to the document */
$document->addScript('templates/' . $this->template . '/js/jquery-1.4.4.min.js');
?>
<?php echo '<?'; ?>xml version="1.0" encoding="<?php echo $this->_charset ?>"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >
<head>
<!-- The following JDOC Head tag loads all the header and meta information from your site config and content. -->
<jdoc:include type="head" />
</head>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment