Book Image

OpenCart Theme and Module Development

By : Rupak Nepali
Book Image

OpenCart Theme and Module Development

By: Rupak Nepali

Overview of this book

Table of Contents (13 chapters)
OpenCart Theme and Module Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Understanding the code in header.tpl


The header.tpl file is at the catalog/view/theme/THEMENAME/template location, and it contains all the links of CSS and JavaScript files. The same header is shown for all the pages, so we describe the code in header.tpl. Go to catalog/view/theme/packttheme/template and open the header.tpl file and add this to the file:

<!DOCTYPE html>

OpenCart follows the HTML5 DOCTYPE declarations, and <!DOCTYPE html> goes at the top of every HTML5 page. The HTML5 word <!DOCTYPE html> means that this page is written in HTML5:

<!--[if IE]><![endif]-->
<!--[if IE 8 ]><html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" class="ie8"><![endif]-->
<!--[if IE 9 ]><html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>"&gt...