Beginner's Guide

help you to assign more importance to the actual content.
The HTML5 code in Beez5 uses only the elements that are reliable right now. Only the Internet
Explorer Version 8 has some problems, as always.
In the top of the page a script is inserted, which integrates the unknown elements in the existing
document structure.
<!--[if lt IE 9]>
<script type="text/JavaScript" src="<?php echo $this->baseurl ?>/ templates/
beez5/JavaScript/html5.js"></script>
<![endif]-->
Basis for the integration of HTML5 in Joomla are the template overrides and the response to the
selected markup language via the template parameter in the index.php. Because the template allows the
use of two different markup languages, you have to approach this possibility in the index.php.
Clearly said: The construction of the index.php is quite complicated, because depending on the
selected markup language another HTML code is generated.
It starts with defining the type of document.
When you open the index.php of Beez5 templates, you can instantly see what I mean.
<?php if(!$templateparams->get('html5', 0)): ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><?php else: ?>
<?php echo '<!DOCTYPE html>'; ?>
<?php endif; ?>
This concept is carried through the whole page and the HTML5 elements can only be issued if
HTML5 was also selected in the backend.
If you later want to build your own template in HTML 5, it would be better you remove all the
queries and XHTML elements and output directly the HTML 5 code.
Joomla! 2.5 - Beginner’s Guide
Monday, 30 January 2012! Page 213