Codeigniter Structure
Codeigniter Folder Structure
- app
-
Views
- auth
- errors
-
partials
- customizer.php / Contain the right sidebar theme customization HTML code.
- footer.php
- head-css.php / added common css files link in this file.
- main.php / html tag with attributes is stored in this common file.
- menu.php
- page-title.php / Breadcrumb is defined in this file.
- sidebar.php / Sidebar menu-related code is in this file.
- title-meta.php / Page title and meta tags are defined in this file.
- topbar.php / Topbar-related code is in this file.
- vendor-scripts.php / Common js files are linked in this file.
- All php views files will be here of the theme.
Codeigniter file structure
<?= $this->include('partials/main') ?>
<head>
<?php echo view('partials/title-meta', array('title'=>'Starter')); ?>
<?= $this->include('partials/head-css') ?>
</head>
<body>
<!-- Begin page -->
<div id="layout-wrapper">
<?= $this->include('partials/menu') ?>
<!-- ============================================================== -->
<!-- Start right Content here -->
<!-- ============================================================== -->
<div class="main-content">
<div class="page-content">
<div class="container-fluid">
<div class="page-title-box">
<div class="row align-items-center">
<div class="col-md-5">
<?php echo view('partials/page-title', array('pagetitle'=>'Judia', 'title'=>'Starter')); ?>
</div><!--end col-->
<div class="col-md-auto ms-auto">
<?= $this->include('partials/customizer') ?>
</div><!--end col-->
</div><!--end row-->
</div>
</div>
<!-- container-fluid -->
</div>
<!-- End Page-content -->
<?= $this->include('partials/footer') ?>
</div>
<!-- end main content-->
</div>
<!-- END layout-wrapper -->
<?= $this->include('partials/vendor-scripts') ?>
<!-- App js -->
<script src="assets/js/app.js"></script>
</body>
</html>
Layout setup
You can set the default layout in the app/Views/partials/main.php
file in the html tag.
<html data-topbar="light" data-layout-width="fluid" data-card-layout="borderless">
data-layout-width="fluid" | To set fluid layout width. |
---|---|
data-layout-width="boxed" | To set boxed layout width. |
data-card-layout="borderless" | To set borderless card layouts. |
data-card-layout="border" | To set border card layouts. |
data-layout-mode="light" | To set Light layout mode. |
data-layout-mode="dark" | To set Dark layout mode. |
data-layout-mode="brand" | To set Brand layout mode. |
data-layout-position="fixed" | To set layout position Fixed. |
data-layout-position="scrollable" | To set layout position Scrollable. |
data-topbar="light" | To set the Light color of Topbar. |
data-topbar="dark" | To set the dark color of Topbar. |
data-topbar="brand" | To set the brand color of Topbar. |
data-topbar-image="pattern-1" | To set the pattern One of Topbar. |
data-topbar-image="pattern-2" | To set the pattern Two of Topbar. |
data-topbar-image="pattern-3" | To set the pattern Three of Topbar. |
data-preloader="enable" | To enable the preloader on the Page. |
data-preloader="disable" | To disable the preloader on the Page. |