[eluser]Unknown[/eluser]
I am creating a login component. I am learning from a video tutorial. I had created a template ( header, dynamic( body), footer). I get an error ” Unable to load the requested file. loginform.php”.
Using an array i pass the name of the dynamic ( body) page, but then this value is not being set in $this->load->view(‘includes/template’,$data).
#—View—#
template.php———- path——views/includes/template.php
<?php $this->load->view(‘includes/header’); ?>
<?php $this->load->view($maincontent); ?>
<?php $this->load->view(‘includes/footer’); ?>
————————————————————————————————-
#—Controller—#
login.php
<?php
class Login extends CI_Controller{
public function index()
{
$data[‘maincontent’] = ‘loginform’;
$this->load->view(‘includes/template’,$data); //this is not working.
}
}
?>
Can you help me resolve it ?
Aarthi