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 footer.tpl


The footer.tpl is located at catalog/view/theme/THEMENAME/template/common/footer.tpl, and it contains all the links to information pages and extra links to other pages. The same footer is shown for all the pages, so we describe the code in footer.tpl:

<footer>
  <div class="container">
    <div class="row">
<?php if ($informations) { ?>
      <div class="col-sm-3">
        <h5><?php echo $text_information; ?></h5>
        <ul class="list-unstyled">
          <?php foreach ($informations as $information) { ?>
          <li><a href="<?php echo $information['href']; ?>"><?php echo $information['title']; ?></a></li>
          <?php } ?>
        </ul>
      </div>
      <?php } ?>

The preceding code starts the div with ID as the footer. It checks whether there are any information pages or not. The information pages are inserted from information...