[eluser]crispinatari[/eluser]
Ive been trying for days and can't even manage to load a simple navigation site, i'm fine with normal php but using codeigniter takes a bit of adjusting to.
here is my home controller for my container page which should load the navigational structure for a home page.
Nothing loads, the load page just loops and times out. i have database as autoload but even when i set it to null nothing loads.
Home controller is:
Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Home extends Controller
{
function home()
{
// load controller parent
parent::Controller();
$this->load->helper('url');
$this->load->helper('form');
}
function index()
{
$data['title'] = 'Employee Page';
$data['header'] = $this->load->view('header', $data, true);
$data['sidemenu'] = $this->load->view('sidemenu', $data, true);
// load the sidemenu view
$data['main'] = $this->load->view('mainnav', $data, true);
$data['footer'] = $this->load->view('footer', $data, true);
// Load the Hello view with some DB stuff
$this->load->view('container', $data);
}
}
?>
container page is this:
Code:
<html>
<head>
<title><?php echo $title ?></title>
<link rel="stylesheet" type="text/css" href="employee.css" />
</head>
<body>
<table class="home" width="95%" cellpadding="1" cellspacing="1" align="center">
<tr valign="top">
<td valign="top" align="left" width="165" bgcolor="#CCCCCC">
<?php echo $header ?></td>
<td valign="top" align="left">
<?php echo $sidemenu ?></td>
<td valign="top" align="left">
<?php echo $main ?></td>
</tr></table>
<?php echo $footer ?>
</body>
</html>
Routes page:
$route['default_controller'] = "Home";
$route['scaffolding_trigger'] = "";
Header Page
Code:
<html>
<body>
<title><?=$heading?></title>
<body>
<h1>Welcome to my home page!</h1>
<p>Some text.</p>
</body>
</html>