CodeIgniter_Gforms/application/controllers/Pages.php

31 lines
623 B
PHP
Raw Permalink Normal View History

2024-07-11 13:04:55 +00:00
<?php
//This controller only manipulates the pages
class Pages extends CI_Controller {
public function view($page = 'home')
{
if(!file_exists(APPPATH.'views/pages/'.$page.'.php')){
show_404();
}
//storing the title of the page
$data['title'] = ucfirst($page);
2024-07-19 11:43:09 +00:00
$this->load->view('templates/header_home');
2024-07-11 13:04:55 +00:00
$this->load->view('pages/'.$page, $data);
$this->load->view('templates/footer');
}
2024-07-19 11:43:09 +00:00
public function hero()
{
//storing the title of the page
$this->load->view('pages/hero');
}
2024-07-11 13:04:55 +00:00
}