proweb
12/10/2011 - 5:42 PM

Правильное (последовательное) подключение мета-тегов, CSS и JS.

Правильное (последовательное) подключение мета-тегов, 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>