Welcome Guest, Not a member yet? Register   Sign In
User Guide Tutorial
#1

[eluser]Unknown[/eluser]
Hi,

I'm new to OOPHP and CI. (Yay for newb questions!) :roll:

I did search around the forum and haven't found this specific answer, albeit most of the answers are over my head anyway. I'm only about 2 days into learning CI and OOPHP, although I have ~12 years of procedural PHP experience.


I have followed the News tutorial News Tutorial Page and I found one part to be vague enough not to follow fully and I think this is where my issue is coming from... which is... nothing is showing in the view.

The potential "offending section":

Quote:Now the data is retrieved by the controller through our model, but nothing is displayed yet. The next thing to do is passing this data to the views.
Code:
public function index()
{
$data['news'] = $this->news_model->get_news();
$data['title'] = 'News archive';

$this->load->view('templates/header', $data);
$this->load->view('news/index', $data);
$this->load->view('templates/footer');
}

So, My question: Specifically, where does this code go?
currently it's sitting in ~/public_html/application/controllers/page.php

If this is right, then I'm completely lost.

TIA for any help!
Mike


Messages In This Thread
User Guide Tutorial - by El Forum - 04-10-2012, 10:59 AM
User Guide Tutorial - by El Forum - 04-10-2012, 11:52 AM
User Guide Tutorial - by El Forum - 04-10-2012, 05:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB