Skip to content

Instantly share code, notes, and snippets.

@proweb proweb/index.php
Created Dec 10, 2011

Embed
What would you like to do?
Правильное (последовательное) подключение мета-тегов, 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
You can’t perform that action at this time.