Welcome Guest, Not a member yet? Register   Sign In
Load Views Problem
#2

[eluser]ecigraeme[/eluser]
In this example Home is the default controller. The web site would have two pages /Home/index and /Home/about. The header view could contain all the html headers then the other views could hold fragments of the html. Im quite new to code ignite so i could have it all wrong, but hopefully this will help you.

class Home extends Controller
{
function index()
{
$data['pageTitle'] = "My web site homepage";

$this->load->view('header',$data);
$this->load->view('menu');
$this->load->view('homepage.php',$data);
$this->load->view('footer',$data);
}

function about()
{
$data['pageTitle'] = "About me";

$this->load->view('header',$data);
$this->load->view('menu');
$this->load->view('thaboutpage.php',$data);
$this->load->view('footer',$data);
}
}

Graeme


Messages In This Thread
Load Views Problem - by El Forum - 01-16-2009, 03:58 AM
Load Views Problem - by El Forum - 01-16-2009, 04:51 AM
Load Views Problem - by El Forum - 01-16-2009, 08:32 AM
Load Views Problem - by El Forum - 01-16-2009, 05:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB