@coolfactor: Ok, I’ve never heard of this “url_walkback”, but i’ll check with my host…
@Derek: Thats just a fictional name for the site, but all the same, the real site is within a subdir called dev. The real site can be located at: http://www.trv.org.au/dev/ . And no the site doesnt even work without the htaccess.
Here’s some sample code to try out (like i said before it is working on my very own setup)
trv/controllers/home.php
<?php
class Home extends Controller {
var $template;
function Home(){
parent::Controller();
}
function index(){
$this->template['title'] = 'Home';
$this->template['description'] = 'Welcome to Target Rifle Victoria';
$this->template['keywords'] = 'trv, target rifle victoria, target shooting, tra, target rifle australia';
$this->template['content'] = $this->load->view('front/home/home_view', NULL, true);
$this->load->view('front/main_view', $this->template);
}
}
?>
trv/views/front/home/home_view.php
<h2>Welcome</h2>
<p>Target Rifle Victoria TRV is the governing body for small bore and air rifle shooting in Victoria.</p>
<p>If you have never tried out the sport we encourage you to find out more about what the sport can offer you - friendship, a chance to compete equally, and the opportunity to participate in events across the state.</p>
<p>We are affiliated with our national body, Target Rifle Australia, and you can therefore compete at events interstate.</p>
<p>For those with even more ambition, our affiliation through the Australian Shooting Association provides a pathway to the Olympic and Commonwealth Games.</p>
trv/view/front/main_view.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?='TRV | '.$title?></title>
<link rel="icon" href="<?=base_url()?>favicon.ico" />
<link rel="shortcut icon" href="<?=base_url()?>favicon.ico" />
<style type="text/css" media="all">
<!--
@import "<?=base_url()?>css/style.css";
-->
</style>
</head>
<body>
<div id="wrapper">
<div id="banner">
<h1>Target Rifle Victoria (TRV)</h1>
</div>
<div id="mainmenu">
<ul>
<li><?=anchor('home', 'Home')?></li>
<li><?=anchor('about_us', 'About Us')?>
<ul>
<li><?=anchor('about_us/membership','Membership')?></li>
</ul>
</li>
<li><?=anchor('try_it_out', 'Try it out!')?>
<ul>
<li><?=anchor('try_it_out/safety','Safety')?></li>
<li><?=anchor('try_it_out/how_do_i_get_involved','How do I get involved?')?></li>
</ul>
</li>
<li><?=anchor('calendar', 'Calendar')?></li>
<li><?=anchor('competitions', 'Competitions')?>
<ul>
<li><?=anchor('competitions/flyers','Flyers & Forms')?></li>
<li><?=anchor('competitions/results','Results')?></li>
</ul>
</li>
<li><?=anchor('media', 'Media')?></li>
<li><?=anchor('clubs', 'Clubs')?></li>
<li><?=anchor('contact_us', 'Contact Us')?></li>
</ul>
</div>
<div id="content">
<div id="right">
<?=isset($submenu) ? $submenu : ''?>
</div>
<div id="left">
<?=$content?>
</div>
<div class="clearer"></div>
</div>
<div id="footer">
<p>©Target Rifle Victoria (TRV) 2006. Designed and maintained by Richard Lee.</p>
</div>
</div>
</div>
</body>
</html>