Hi to all,
i hope all have good day,
I am a new to codeigniter, Some body tell me how to call (or) pull pages in view To menu in code Igniter
Here is my code like
---------------------------------------
pages.php(controller)
---------------------------------------
<?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('templates/menu', $data);
$this->load->view('pages/'.$page, $data);
$this->load->view('templates/footer', $data);
}
}
?>
My view pages are home.php , contact.php , about.php
I wish to display in horizontal menu dynamically.
Thanks if any suggestions....