[eluser]Ed Robindon[/eluser]
I'm trying to do a simple site with an application wide template view:
The view template:
Code:
<!DOCTYPE html>
<html>
<head>
<title> <?php echo $title; ?></title>
<link rel='stylesheet' href='assets/styles/site_style.css' />
</head>
<body>
<div id="wrapper">
<div id="header">
<?php echo $page_title; ?><br/><br/>
<a href="home/about">About Us</a>
</div>
<div id="content">
<?php echo $content; ?>
</div>
<div id="footer">
Copyright © <?php echo date('Y')?> by Client Name. All rights reserved.
</div>
</div>
</body>
</html>
The controller:
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Home extends CI_Controller {
public function index()
{
$this->showpage('Home Page', 'Home Page', 'home');
}
public function about()
{
$this->showpage('About Us', 'About Us', 'about');
}
public function showpage($title,$page_title,$template)
{
$data['title'] = $title;
$data['page_title'] = $page_title;
$data['content'] = $this->load->view($template,'',TRUE);
$this->load->view('app_template',$data);
}
}
/* End of file home.php */
/* Location: ./application/controllers/home.php */
The index display works fine.
When I call for the about page it has no css and Firebug shows a 404 under the link tag.
Any thoughts?
Ed