update
This commit is contained in:
18
application/controllers/Pages.php
Normal file
18
application/controllers/Pages.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
class Pages extends CI_Controller {
|
||||
|
||||
public function view($page = 'home')
|
||||
{
|
||||
if ( ! file_exists(APPPATH.'views/pages/'.$page.'.php'))
|
||||
{
|
||||
// Whoops, we don't have a page for that!
|
||||
show_404();
|
||||
}
|
||||
|
||||
$data['title'] = ucfirst($page); // Capitalize the first letter
|
||||
|
||||
$this->load->view('templates/header', $data);
|
||||
$this->load->view('pages/'.$page, $data);
|
||||
$this->load->view('templates/footer', $data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user