Шаблон Joomla 2.5 HTML5

Я изучаю, как создать шаблон в Joomla 2.5, и у меня есть следующий код из курса Lynda, за которым я следую:

<head>
<?php
defined('_JEXEC') or die;
$app = JFactory::getApplication();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/default.css" type="text/css" />
</head>

Я хочу использовать HTML5. Могу ли я просто заменить тип документа xhtml 1.0 выше следующим (или я пропустил что-то еще, чтобы включить html5?):

<head>
<?php
defined('_JEXEC') or die;
$app = JFactory::getApplication();
?>
<!DOCTYPE html>
<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/default.css" type="text/css" />
</head>

person Anthony    schedule 15.04.2013    source источник
comment
Вы можете поменять его, только он не будет проверять, используются ли устаревшие теги id   -  person Mr. Alien    schedule 15.04.2013
comment
вам также не понадобится type="text/css" ;)   -  person Lodder    schedule 15.04.2013


Ответы (1)


Для Джумлы 3.2:

$doc = JFactory::getDocument();
$doc->setHtml5(true);

Вы можете см....

person Fox    schedule 02.01.2014