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
#2

[eluser]Unknown[/eluser]
haha....

You're all laughing at me aren't you? I can tell.

So I figured it out. Sorry to waste bandwidth.
#3

[eluser]Samus[/eluser]
[quote author="polloraro" date="1334083939"]haha....

You're all laughing at me aren't you? I can tell.

So I figured it out. Sorry to waste bandwidth.[/quote]
It'd probs be a good idea to post in the correct forum next time, as you're more likely to get a response on coding help there.

http://ellislab.com/forums/viewforum/127/

And yeah, it would go there.




Theme © iAndrew 2016 - Forum software by © MyBB