El Forum
02-21-2012, 04:45 PM
[eluser]BenBrah[/eluser]
I followed this http://www.youtube.com/watch?v=gvGymDhY49E
Creating Your First Template With CodeIgniter
Updated the controller to CI_controller
Basically when i go to
http://influencearticles.com/index.php/site/about_us
It should be calling the about_us.php information and adding it to the middle
and again with
http://influencearticles.com/index.php/site/contact_us
But I'm getting errors on all 3 including just /site
Can anyone tell me where i've gone wrong please?
Site / Controller
header
footer
about us
and finally contact us page
I followed this http://www.youtube.com/watch?v=gvGymDhY49E
Creating Your First Template With CodeIgniter
Updated the controller to CI_controller
Basically when i go to
http://influencearticles.com/index.php/site/about_us
It should be calling the about_us.php information and adding it to the middle
and again with
http://influencearticles.com/index.php/site/contact_us
But I'm getting errors on all 3 including just /site
Can anyone tell me where i've gone wrong please?
Site / Controller
Code:
<php
class SITE extends CI_controller {
function contact_us()
{
&data;['main_content'] = 'contact_us';
$this->load->view('template', &data;);
}
function about_us()
{
&data;['main_content'] = 'about_us';
$this->load->view('template', &data;);
}
}
header
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content_Type" content="text/html; charset=utf-8">
<title>untitled<title>
</head>
<body>
<p>this comes from the header view</p>
footer
Code:
<p>This is the footer</p>
<body>
</html>
about us
Code:
<p>This is the about us page.</p>
and finally contact us page
Code:
<p>This is the contact us page.</p>