logo
down
shadow

What's good way to load header and footer view in codeigniter?


What's good way to load header and footer view in codeigniter?

By : rayser
Date : November 21 2020, 07:01 PM


Share : facebook icon twitter icon
CodeIgniter - Load scripts in footer view from content view file

CodeIgniter - Load scripts in footer view from content view file


By : fjw
Date : March 29 2020, 07:55 AM
Codeigniter MY_Controller does not load header/footer.php

Codeigniter MY_Controller does not load header/footer.php


By : Junwei Wu
Date : March 29 2020, 07:55 AM
this one helps. In your Home Controller you're loading the view directly, instead of using render_page function.
So, change:
Call 1 view in Codeigniter but share header/footer among all views?

Call 1 view in Codeigniter but share header/footer among all views?


By : Lang Liu
Date : March 29 2020, 07:55 AM
hope this fix your issue Loving Codeigniter, but I'm finding it annoying that I have to call a header, footer and the main view for each controller. , create a view, let's call it template.php with this code
code :
<?php 
$this->load->view('header');
$this->load->view($view);
$this->load->view('footer');
?>
//the name of the view file you want to show, in my case I want to open the login_page.php view that's inside the folder user
$data['view'] = 'user/login_page';
//load the data variable so I can use it across the views
$this->load->vars($data);
//load the template.php view that will load header, user/login_page and footer
$this->load->view('template');
How to load page views like header, sidebar, footer in CodeIgniter?

How to load page views like header, sidebar, footer in CodeIgniter?


By : P.Thakkar
Date : March 29 2020, 07:55 AM
My (header,footer) and js,css,image,favicon load only in index method not in other in codeigniter

My (header,footer) and js,css,image,favicon load only in index method not in other in codeigniter


By : Arnold
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , I am new to code igniter and integrating bootstrap template with code igniter. i have created several pages in template already and try to integrate it with CI. , This is cause error, view file load looks ok. Change this.
code :
<script src='<?php echo $this->base_url();?>assets/js/jquery.colorbox-min.js'></script>
<script src='<?php echo base_url('assets/js/jquery.colorbox-min.js');?>'></script>
shadow
Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk