Top

HTML file structure


Codeigniter yet highly flexible, layout system that makes it easy to use one or more basic layouts throughout our theme, making it more readable and easy to modify.

We have created views/layout which contains all the common css and javascript files and we have also included header and footer in this file as they are the same in a majority of the pages.

index.php

            
<?php include('partial/header.php'); ?>
<link rel="stylesheet" type="text/css" href="assets/css/vendors/animate.css">
<link rel="stylesheet" type="text/css" href="assets/css/vendors/chartist.css">
<link rel="stylesheet" type="text/css" href="assets/css/vendors/date-picker.css">

<?php include('partial/loader.php'); ?>


<div class="page-wrapper compact-wrapper" id="pageWrapper"></div>
    
    <?php include('partial/topbar.php'); ?>
        
            
            <div class="page-body-wrapper"></div>
            
            <?php include('partial/sidebar.php'); ?>
            
            <div class="page-body">
            <?php include('partial/breadcrumb.php'); ?>
            
            <div class="container-fluid"></div>
            
            </div>
            <?php include('partial/footer.php'); ?>
            </div>
        </div>

<?php include('partial/scripts.php'); ?>

<script src="../assets/js/prism/prism.min.js"></script>
<script src="../assets/js/clipboard/clipboard.min.js"></script>
<script src="../assets/js/custom-card/custom-card.js"></script>
<script src="../assets/js/document/main.js"></script>    

<?php include('partial/footer-end.php') ; ?>
  

As you can see, we have extended the index.php file and added additional css and javascript files below the 'css' and 'script' blocks. And write the content of the page below the 'body' block.

You can see that we have used include , to add multiple sections of the page. We have divided the page into small sections and used include to add them where they are required.

These small sections of code are in the layout folder.