Welcome Guest, Not a member yet? Register   Sign In
a real life project with ci. THE BEST STRUCTURE= header-footer-sidebar, where to include ....
#4

[eluser]Brain Coder[/eluser]
Quote:= Where to keep header.php, footer.php, sidebar.php ... ?
= where to include them into page?
= how to include them into page?

1- keep it in the viewer directory
2- include what you want like this

$this->load->view('footer');

and i suggest to use something like this in your controller

$data['main'] = 'admin_pages_create';
$this->load->view('template',$data);

the admin_pages_create is a page in your viewer directory

and you can loading it by using

<?php $this->load->view($main);?>

in your template view


Messages In This Thread
a real life project with ci. THE BEST STRUCTURE= header-footer-sidebar, where to include .... - by El Forum - 06-23-2009, 03:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB